"How do I fetch a news article or the active newsgroups?" in perlfaq9

How do I fetch a news article or the active newsgroups? ... ::NNTPClient->new->list("newsgroups")'

"How do I substitute case insensitively on the LHS while preserving case on the RHS?" in perlfaq6

} else { substr($new, $i, 1) = uc(substr($new, $i, 1)); ... } elsif ($state == 2) { substr($new, $oldlen) = uc(substr($new, $oldlen

"How do I merge two hashes?" in perlfaq4

If you want to preserve the original hashes, copy one hash (%hash1) to a new hash (%new_hash), then add ... the keys from the other hash (%hash2 to the new hash.

"How can I reliably rename a file?" in perlfaq5

) or system("mv", $old, $new); It may be more portable to use the File::Copy module instead. ... You just copy to the new file to the new name (checking return values), then delete the old one.

"How can I split a [character] delimited string except when inside [character]?" in perlfaq4

He suggests (assuming your string is contained in $text): @new = (); push(@new, $+ ... module (part of the standard Perl distribution) lets you say: use Text::ParseWords; @new

"How do I use MIME to make an attachment to a mail message?" in perlfaq9

use MIME::Lite; ### Create a new multipart message: $msg = MIME::Lite->new( ... mixed' ); ### Add parts (each "attach" has same arguments as "new

"What's the difference between dynamic and lexical (static) scoping? Between local() and my()?" in perlfaq7

local($x) saves away the old value of the global variable $x and assigns a new value for the duration ... my($x) creates a new variable that is only visible in the current subroutine.

"How stable is Perl?" in perlfaq1

Production releases, which incorporate bug fixes and new functionality, are widely tested before release ... invalidate a program written for an earlier version of perl (barring accidental bug fixes and the rare new

"How can I copy a file?" in perlfaq5

use File::Copy; copy( $original, $new_copy ) or die "Copy failed: $!" ... You also have to remember to copy the permissions, owner, and group to the new file.

"How do I convert between numeric representations/bases/radixes?" in perlfaq4

", -8))); Using the CPAN module Bit::Vector: use Bit::Vector; $vec = Bit::Vector->new_Hex ... dec = oct("33653337357"); Using Bit::Vector: use Bit::Vector; $vec = Bit::Vector->new

"What's wrong with always quoting "$vars"?" in perlfaq4

Think of it this way: double-quote expansion is used to produce new strings. ... If you get used to writing odd things like these: print "$var"; # BAD $new

"How can I comment out a large block of Perl code?" in perlfaq7

You have to put these directives at the beginning of the line and somewhere where Perl expects a new ... the comment with =cut, ending the Pod section: =pod my $object = NotGonnaHappen->new

"What was Ponie?" in perlfaq1

(contributed by brian d foy) Ponie stands for "Perl On the New Internal Engine", started by Arthur Bergman ... Instead of using the current Perl internals, Ponie aimed to create a new one that would provide a translation

"How do I change, delete, or insert a line in a file, or append to the beginning of a file?" in perlfaq5

; open my $out, '>', "$" or die "Can't write new file: $!" ... open my $out, '>', "$" or die "Can't write new file: $!"

"How do I shuffle an array randomly?" in perlfaq4

splice, randomly picking another element to swap the current element with srand; @new ... = (); @old = 1 .. 10; # just a demo while (@old) { push(@new, splice

"Can I use perl to run a telnet or ftp session?" in perlfaq8

handshaking, then the standard dual-process approach will suffice: use IO::Socket; # new ... in 5.004 $handle = IO::Socket::INET->new('') or die "can't connect

"How come when I open a file read-write it wipes it out?" in perlfaq5

; To open file for writing, create new file if needed or else truncate old file: open(FH, " ... See also the new perlopentut if you have it (new for 5.6).

"How do I make a temporary file name?" in perlfaq5

If you don't have a modern enough Perl installed, use the new_tmpfile class method from the IO::File ... () or die "Unable to make new temporary file: $!"

"What is variable suicide and how can I prevent it?" in perlfaq7

foobarbarbar Finally foo The $f that has "bar" added to it three times should be a new ... $f my $f should create a new lexical variable each time through the loop.

"How can I use a reference as a hash key?" in perlfaq4

This will mean a new variable might accidentally be associated with the value for an old. ... handle renaming the keys if you use multiple threads (which causes all variables to be reallocated at new

More results found. Refine your search terms or show all FAQ results.


sysseek - position I/O pointer on handle used with sysread and syswrite

The values for WHENCE are 0 to set the new position to POSITION, 1 to set the it to the current position ... ; thus sysseek returns true on success and false on failure, yet you can still easily determine the new

link OLDFILE,NEWFILE Creates a new filename linked to the old filename.

write - print a picture record

record, the page is advanced by writing a form feed, a special top-of-page format is used to format the new ... The number of lines remaining on the current page is in variable $-, which can be set to 0 to force a new

symlink OLDFILE,NEWFILE Creates a new filename symbolically linked to the old filename.

join - join a list into a string using a separator

separate strings of LIST into a single string with fields separated by the value of EXPR, and returns that new

tie - bind a variable to an object class

Any additional arguments are passed to the new method of the class (meaning TIESCALAR, TIEHANDLE, TIEARRAY ... The object returned by the new method is also returned by the tie function, which would be useful if

chroot - make directory new root for path lookups

chroot This function works like the system call by the same name: it makes the named directory the new

unshift - prepend more elements to the beginning of a list

Prepends list to the front of the array, and returns the new number of elements in the array.

opendir - open a directory

an undefined scalar variable (or array or hash element), the variable is assigned a reference to a new

fileno - return file descriptor from filehandle

THAT)) { print "THIS and THAT are dups\n"; } (Filehandles connected to memory objects via new

sort - sort a list of values

first integer after the first = sign, or the # whole record case-insensitively otherwise @new ... @caps = (); for (@old) { push @nums, /=(\d+)/; push @caps, uc($_); } @new

die - raise an exception or bail out

\n" unless chdir '/usr/spool/news'; chdir '/usr/spool/news' or die "Can't cd to spool: $! ... Here's an example: use Scalar::Util 'blessed'; eval { ... ; die Some::Module::Exception->new

dump - create an immediate core dump

When the new binary is executed it will begin by executing a goto LABEL (with all the restrictions that

reverse - flip a string or a list

Also, this has to unwind one hash and build a whole new one, which may take some time on a large hash

crypt - one-way passwd-style encryption

This ensures crypt() will hash the new string with the same salt as the digest. ... When choosing a new salt create a random two character string whose characters come from the set [./0

fork - create a new process just like this one

fork Does a fork(2) system call to create a new process running the same program at the same point

seek - reposition file pointer for random-access I/O

The values for WHENCE are 0 to set the new position in bytes to POSITION, 1 to set it to the current

dbmopen - create binding on a tied dbm file

Example: # print out history file offsets dbmopen(%HIST,'/usr/lib/news/history',0666); while

alarm - schedule a SIGALRM

previous timer, and an argument of 0 may be supplied to cancel the previous timer without starting a new

caller - get context of the current subroutine call

$hasargs is true if a new instance of @_ was set up for the frame.

More results found. Refine your search terms or show all function results.


feature - Perl pragma to enable new syntactic features

NAME feature - Perl pragma to enable new syntactic features SYNOPSIS use feature qw(switch say); given ... ':5.10'; # loads all features available in perl 5.10 DESCRIPTION It is usually impossible to add new

perlnewmod - preparing a new module for distribution

NAME perlnewmod - preparing a new module for distribution DESCRIPTION This document gives you some ... Check it's new There are a lot of modules on CPAN, and it's easy to miss one that's similar to what

perldelta - what is new for perl v5.10.1

Modules and Pragmata New Modules and Pragmata autodie This is a new lexically-scoped alternative ... New Tests Many modules updated from CPAN incorporate new tests.

perlmodlib - constructing new Perl modules and finding existing ones

Try to design the new module to be easy to extend and reuse. ... ->new(); ?

CPANPLUS::Selfupdate - CPANPLUS::Selfupdate

( $backend_object ); Sets up a new selfupdate object. ... Called automatically when a new backend object is created.

Dumpvalue - provides screen dump of Perl data.

SYNOPSIS use Dumpvalue; my $dumper = Dumpvalue->new; $dumper->set(globPrint => 1); $dumper->dumpValue ... ); $dumper->dumpvars('main'); my $dump = $dumper->stringify($some_value); DESCRIPTION Creation A new

TAP::Parser::Scheduler - Schedule tests during parallel testing

VERSION Version 3.17 SYNOPSIS use TAP::Parser::Scheduler; DESCRIPTION METHODS Class Methods new ... my $sched = TAP::Parser::Scheduler->new; Returns a new TAP::Parser::Scheduler object.

perlreapi - perl regular expression plugin interface

It's up to the engine to make sure this is used as the new value (or reject it). ... pattern instead of compiling a new one.

Encode::Alias - alias definitions to encodings

=> ENCODING); DESCRIPTION Allows newName to be used as an alias for ENCODING. ... to make the new definition available

Search::Dict - search for key in dictionary file

Returns the new file position, or -1 if an error occurs.

Devel::PPPort - Perl/Pollution/Portability

newRV_inc newRV_noinc newSV_type newSVpvn newSVpvn_flags newSVpvn_share newSVpvn_utf8 newSVpvs newSVpvs_flags ... newATTRSUB newXS newXSproto new_collate new_ctype new_numeric op_dump perl_parse pmop_dump re_intuit_string

SelectSaver - save and restore selected file handle

- save and restore selected file handle SYNOPSIS use SelectSaver; { my $saver = SelectSaver->new ... ; # new handle may be selected, or not } # previous handle is selected DESCRIPTION A SelectSaver

Pod::Plainer - Perl extension for converting Pod to old style Pod.

SYNOPSIS use Pod::Plainer; my $parser = Pod::Plainer -> new (); $parser -> parse_from_filehandle(\* ... This can be used to pre-process Pod before using tools which do not recognise the new style Pods.

Tie::Scalar - base class definitions for tied scalars

, 'NewScalar'; tie $new_std_scalar, 'NewStdScalar'; DESCRIPTION This module provides some skeletal ... Associates a new scalar instance with the specified class.

Tie::Handle - base class definitions for tied handles

NAME Tie::Handle - base class definitions for tied handles SYNOPSIS package NewHandle; require Tie ... Associates a new glob instance with the specified class.

Tie::Hash - base class definitions for tied hashes

, 'NewHash'; tie %new_std_hash, 'NewStdHash'; tie %new_extra_hash, 'NewExtraHash', sub {warn "Doing ... Associates a new hash instance with the specified class.

threads - Perl interpreter-based threads

Interpreter threads are different from 5005threads (the thread model of Perl 5.005) by creating a new ... $old_size = threads->set_stack_size($new_size); Sets a new default per-thread stack size, and returns

Encode::PerlIO - Encode::PerlIO -- a detailed document on Encode and PerlIO

If Perl is configured to use the new 'perlio' IO system then Encode provides a "layer" (see PerlIO) which ... iliad.utf8'); my @epic = <$iliad>; print $utf8 @epic; close($utf8); close($illiad); In addition, the new

perlunitut - Perl Unicode Tutorial

This means that programmers need new habits. ... Your new toolkit Add to your standard heading the following line: use Encode qw(encode decode); Or

Test::Harness - Run Perl standard test scripts with statistics

If you're writing new code consider using TAP::Harness directly instead.

More results found. Refine your search terms or show all documentation results.


"New variables" in perl592delta

New variables A new variable, ${^RE_DEBUG_FLAGS}, controls what debug flags are in effect for the regular ... A new variable ${^UTF8LOCALE} indicates where an UTF-8 locale was detected by perl at startup.

"New Documentation" in perl5101delta

perlmroapi This describes the new interface for pluggable Method Resolution Orders. ... perlthanks This describes the new perlthanks utility.

"New Tests" in perl571delta

New Tests Many new tests have been added.

"New tests" in perl561delta

New tests lib/attrs Compatibility tests for sub : attrs vs the older use attrs. ... lib/env Tests for new environment scalar capability (e.g., use Env qw($BAR);).

"New tests" in perl56delta

New tests lib/attrs Compatibility tests for sub : attrs vs the older use attrs. ... lib/env Tests for new environment scalar capability (e.g., use Env qw($BAR);).

"New Tests" in perl572delta

New Tests Several new tests have been added, especially for the lib subsection.

"New Tests" in perl58delta

New Tests Several new tests have been added, especially for the lib and ext subsections. ... Many of the new tests are of course introduced by the new modules, but still in general Perl is now more

"New Documentation" in perl5100delta

New Documentation The perlpragma manpage documents how to write one's own lexical pragmas in pure Perl ... A new manual page, perlunifaq (the Perl Unicode FAQ), has been added (Juerd Waalboer).

"New Tests" in perl586delta

New Tests There are significantly more tests for the B suite of modules.

"New Documentation" in perl572delta

New Documentation Locale::Maketext::TPJ13 is an article about software localization, originally published ... The new files are perlapollo, perlbeos, perldgux, perlhurd, perlmint, perlnetware, perlplan9, perlqnx

"New Documentation" in perl571delta

New Documentation perlclib Internal replacements for standard C library functions.

"New parser" in perl591delta

New parser perl's parser is now generated by bison (it used to be generated by byacc.)

"New Documentation" in perl588delta

New Documentation The perlglossary manpage is a glossary of terms used in the Perl documentation, technical

"New Platforms" in perl589delta

New Platforms Compile support added for: DragonFlyBSD MidnightBSD MirOS BSD RISC OS Cray XT4/Catamount

"New Documentation" in perl570delta

New Documentation perl56delta details the changes between the 5.005 release and the 5.6.0 release. ... perlnewmod tells about writing and submitting a new module.

"New Documentation" in perl583delta

New Documentation The documentation has been revised in places to produce more standard manpages.

"New parser" in perl5100delta

New parser perl's parser is now generated by bison (it used to be generated by byacc.)

"New probes" in perl593delta

New probes Configure will now detect clearenv and unsetenv, thanks to a patch from Alan Burlison.

"New probes" in perl594delta

New probes The configuration process now detects whether strlcat() and strlcpy() are available.

"New Modules" in perl570delta

Modules and Pragmata New Modules File::Temp allows one to create temporary files and directories in

More results found. Refine your search terms or show all perldelta results.