"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

uc $new | (uc $1 ^ $1) . ... # finish up with any remaining new (for when new is longer than old) if ($newlen > $oldlen) {

"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]? (Comma-separated files)" in perlfaq4

He suggests (assuming your string is contained in $text): @new = (); push(@new, $+) while ... | , }gx; push(@new, undef) if substr($text,-1,1) eq ','; If you want to represent quotation

"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( ... =>'multipart/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 do I convert between numeric representations?" in perlfaq4

; $dec = sprintf("%d", $int); Using Bit::Vector: use Bit::Vector; $vec = Bit::Vector->new ... Using Bit::Vector: $vec = Bit::Vector->new_Bin(32, "11011110101011011011111011101111"); $dec

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

Think of it this way: double-quote expansion is used to produce new strings. ... Those should (in 99.8% of the cases) be the simpler and more direct: print $var; $new = $old

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

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

"What happens if I add or remove keys from a hash while iterating over it?" in perlfaq4

because that might cause a doubling of the hash table, in which half the entries get copied up to the new ... Even if the table doesn't double, there's no telling whether your new entry will be inserted before or

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

} } T; print "Finally $f\n"; The $f that has "bar" added to it three times should be a new ... $f (my $f should create a new local variable each time through the loop).

"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('') || die "can't connect to

"How do I efficiently match many regular expressions at once?" in perlfaq6

As of the 5.005 release, there's a much better approach, one which makes use of the new qr// operator ... : # use spiffy new qr// operator, with /i flag even use 5.005; @popstates = qw(CO ON MI

"I put a regular expression into $/ but it didn't work. What's wrong?" in perlfaq6

$fh = new IO::File "+<file"; ## Attach it to a "stream" object. ... use Net::Telnet; $file = new Net::Telnet (-fhopen => $fh); ## Search for the second line and

"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: $!"

"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, "> $path ... See also the new perlopentut if you have it (new for 5.6).

"How do I declare/create a structure?" in perlfaq7

Here's an example: $person = {}; # new anonymous hash $person->{AGE} = 24

"How do I modify the shadow password file on a Unix system?" in perlfaq8

To change the file, make a new shadow password file (the format varies from system to system--see passwd

"How do I edit my .htpasswd and .htgroup files with Perl?" in perlfaq9

Here's an example: use HTTPD::UserAdmin (); HTTPD::UserAdmin ->new(DB => "/foo/.htpasswd

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

push - append one or more elements to an array

Returns the new number of elements in the array.

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.

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

fileno - return file descriptor from filehandle

THAT)) { print "THIS and THAT are dups\n"; } (Filehandles connected to memory objects via 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: eval { ... ; die Some::Module::Exception->new( FOO => "bar" ) }; if ($@)

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

read - fixed-length buffered input from a filehandle

If SCALAR needs growing, the new bytes will be zero bytes.

our - declare and assign a package variable (lexical scoping)

"1.00"; Note that this attribute also has the effect of making the global readonly when the first new ... interpreter is cloned (for example, when the first new thread is created).

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.

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

caller - get context of the current subroutine call

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

alarm - schedule a SIGALRM

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

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

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


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.8.0

Highlights In 5.8.0 Better Unicode support New IO Implementation New Thread Implementation Better ... New Tests Several new tests have been added, especially for the lib and ext subsections.

perlmodlib - constructing new Perl modules and finding existing ones

Try to design the new module to be easy to extend and reuse. ... For example, does your application still work if you change: $obj = new YOURCLASS; into: $obj = new SUBCLASS

Dumpvalue - provides screen dump of Perl data.

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

Test - provides a simple framework for writing test scripts

If you are writing a new test, we highly suggest you use the new Test::Simple and Test::More modules

Unicode::Collate - Unicode Collation Algorithm

Unicode Collation Algorithm SYNOPSIS use Unicode::Collate; #construct $Collator = Unicode::Collate->new ... DESCRIPTION Constructor and Tailoring The new method returns a collator object.

Encode::Alias - alias definitions to encodings

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

Devel::PPPort - Perl/Pollution/Portability

ppport.h Devel::PPPort::WriteFile('someheader.h') ; DESCRIPTION Perl has changed over time, gaining new ... (stash,name,sv) newRV_inc(sv) newRV_noinc(sv) newSVpvn(data,len) NOOP NV NVef NVff NVgf PERL_REVISION

Search::Dict - search for key in dictionary file

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

SelectSaver - save and restore selected file handle

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

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.

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::Handle - base class definitions for tied handles

NAME Tie::Handle, Tie::StdHandle - base class definitions for tied handles SYNOPSIS package NewHandle ... 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.

perlthrtut - tutorial on threads in Perl

->new(\&sub1); sub sub1 { print "In the thread\n"; } The new() method takes a reference to a ... create() is a synonym for new().

threads - Perl extension allowing use of interpreter based threads from perl

The new() method is an alias for create(). ... Like threads->new, async returns a thread object.

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

perlfork - Perl's fork() emulation

and all its state, and run the cloned interpreter in a separate thread, beginning execution in the new ... This limitation can be easily worked around in new code by creating a pipe explicitly.

perlxs - XS language reference manual

then the C++ new function will be called to create a dynamic C++ object. ... color * color::new() The generated C++ code will call new.

perlintro - perlintro -- a brief introduction and overview of Perl

It is intended as a "bootstrap" guide for those who are new to the language, and provides just enough

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


"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 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 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 Modules" in perl570delta

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

"New Platforms" in perl5005delta

New Platforms BeOS is now supported. See README.beos. DOS is now supported under the DJGPP tools.

"New Configure flags" in perl561delta

New Configure flags The following new flags may be enabled on the Configure command line by running ... usemultiplicity usethreads useithreads (new interpreter threads: no Perl API yet) usethreads

"New Configure flags" in perl56delta

New Configure flags The following new flags may be enabled on the Configure command line by running ... usemultiplicity usethreads useithreads (new interpreter threads: no Perl API yet) usethreads

"New Modules" in perl5005delta

Modules and Pragmata New Modules B Perl compiler and tools. See B.

"New and changed syntax" in perl5004delta

New and changed syntax $coderef->(PARAMS) A subroutine reference may now be suffixed with an arrow ... This new syntax follows the pattern of $hashref->{FOO} and $aryref->[$foo]: You may now write &$subref

"New or Changed Diagnostics" in perl571delta

New or Changed Diagnostics Two new debugging options have been added: if you have compiled your Perl

"New INIT keyword" in perl5005delta

New INIT keyword INIT subs are like BEGIN and END, but they get run just before the perl runtime begins

"New qr// operator" in perl5005delta

New qr// operator The qr// operator, which is syntactically similar to the other quote-like operators

"New Or Improved Platforms" in perl572delta

Installation and Configuration Improvements New Or Improved Platforms AIX should now work better with ... AtheOS ( ) is a new platform.

"New lock keyword" in perl5005delta

New lock keyword The lock keyword is the fundamental synchronization primitive in threaded perl.

"New or Changed Diagnostics" in perl570delta

New or Changed Diagnostics All regular expression compilation error messages are now hopefully easier

"New Modules" in perl571delta

Modules and Pragmata New Modules B::Concise, by Stephen McCamant, is a new compiler backend for walking

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