"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 compelling 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 do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file?" in perlfaq5

; open(NEW, "> $new") or die "can't open $new: $!" ... ; close(NEW) or die "can't close $new: $!"

"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

"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

"What are the Perl newsgroups on Usenet? Where do I post questions?" in perlfaq2

also Usenet gateway to the mailing list used by the crack Perl development team (perl5-porters) at news ... :// .

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

Use the new_tmpfile class method from the IO::File module to get a filehandle opened for reading and ... ) or die "Unable to make new temporary file: $!"

"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).

"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

"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

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

$fh = new FileHandle "+<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 cross-reference my Perl programs?" in perlfaq3

The B::Xref module, shipped with the new, alpha-release Perl compiler (not the general distribution prior

"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

"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).

"Why doesn't open() return an error when a pipe open fails?" in perlfaq8

Because the pipe open takes place in two steps: first Perl calls fork() to start a new process, then ... this new process calls exec() to run the program you really wanted to open.

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 ... Returns the new position, or the undefined value on failure.

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

push - append one or more elements to an array

Returns the new number of elements in the array.

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

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.

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

read - fixed-length buffered input from a filehandle

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

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 ($@)

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

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

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

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 to POSITION, 1 to set it to the current position

caller - get context of the current subroutine call

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

crypt - one-way passwd-style encryption

When choosing a new salt create a random two character string whose characters come from the set [./0

alarm - schedule a SIGALRM

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

dbmopen - create binding on a tied dbm file

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

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's new for perl v5.6.x

IO::Socket::INET->new now sets $! ... New Configure flags The following new flags may be enabled on the Configure command line by running

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'); DESCRIPTION Creation A new dumper is created by a call $d = new

Search::Dict - search for key in dictionary file

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

perlthrtut - tutorial on threads in Perl

The simplest, straightforward way to create a thread is with new(): use Thread; $thr = new Thread ... Thread::Semaphore; $GlobalVariable = 0; $thr1 = new Thread \&sample_sub, 1; $thr2 = new Thread \&

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.

Tie::Hash - base class definitions for tied hashes

, 'NewHash'; tie %new_std_hash, 'NewStdHash'; DESCRIPTION This module provides some skeletal methods ... Associates a new hash 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.

perlfork - Perl's fork() emulation (EXPERIMENTAL, subject to change)

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.

AnyDBM_File - provide framework for multiple DBMs

This way old programs that used to use NDBM via dbmopen() can still do so, but new ones can reorder @ ... trivial to copy database formats: use POSIX; use NDBM_File; use DB_File; tie %newhash, 'DB_File', $new_filename

perlreftut - Mark's very short tutorial about references

USA: Chicago, New York, Washington. ... makes a new, anonymous hash. and returns a reference to that hash.

B - The Perl Compiler

The B module is of use to those who want to write new compiler backends.

perlbot - Bag'o Object Tricks (the BOT)

A subclass may want to override that data and replace it with new data. ... bless $self, $type; } package main; $a = Bar->new; $b = Foo->new; $a->enter; $b->enter; INHERITING

Pod::InputObjects - objects representing POD input paragraphs, commands, etc.

It has the following methods/attributes: Pod::Paragraph->new() my $pod_para1 = Pod::Paragraph->new( ... Pod::ParseTree->new() my $ptree1 = Pod::ParseTree->new; my $ptree2 = new Pod::ParseTree; my $ptree4

Pod::ParseUtils - helpers for POD parsing and conversion

The following methods are available: Pod::List->new() Create a new list object. ... The following methods are available: Pod::Cache->new() Create a new cache object.

perlapi - autogenerated documentation for the perl public API

void New(int id, void* ptr, int nitems, type) newAV Creates a new AV. ... void newCONSTSUB(HV* stash, char* name, SV* sv) newHV Creates a new HV.

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


"New Platforms" in perl5005delta

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

"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 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 lock keyword" in perl5005delta

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

"New Diagnostics" in perl5004delta

New Diagnostics Several new conditions will trigger warnings that were silent before. ... The following new warnings and errors outline these.

"About the new versioning system" in perl5005delta

About the new versioning system Perl is now developed on two tracks: a maintenance track that makes ... Perl 5.005 is the combined product of the new dual-track development scheme.

"New and changed builtin constants" in perl5004delta

New and changed builtin constants __PACKAGE__ The current package name at compile time, or the undefined

"New Diagnostics" in perl5005delta

New Diagnostics Ambiguous call resolved as CORE::%s(), qualify as such or use & (W) A subroutine you

"New and changed builtin variables" in perl5004delta

New and changed builtin variables $^E Extended error message on some platforms. ... Not actually new, but newly documented.

"New builtin methods" in perl5004delta

New builtin methods The UNIVERSAL package automatically contains the following methods that are inherited

"New Opcode module and revised Safe module" in perl5004delta

New Opcode module and revised Safe module A new Opcode module supports the creation, manipulation and ... The revised Safe module has a new API and is implemented using the new Opcode module.

"New and changed builtin functions" in perl5004delta

It is the recommended method for new code. ... (Not actually new; just never documented before.)

"Relaxed new mandatory warnings introduced in 5.004" in perl5005delta

Relaxed new mandatory warnings introduced in 5.004 Many new warnings that were introduced in 5.004 have ... See "New Diagnostics".

"Foo:: can be used as implicitly quoted package name" in perl5005delta

The recommended way to write barewords in the indirect object slot is new Foo:: @args. ... Note that the method new() is called with a first argument of Foo, not Foo:: when you do that.

"Perl Source Compatibility" in perl5005delta

Some new keywords have been introduced. ... See "New INIT keyword", "New lock keyword", and "New qr// operator".

"Documentation Changes" in perl5004delta

perldebug Although not new, this has been massively updated. ... perlsec Although not new, this has been massively updated.

"Regular Expressions" in perl5005delta

Regular Expressions Perl's regular expression engine has been seriously overhauled, and many new constructs ... >RE) \z New operator for precompiled regular expressions See "New qr// operator".

"More precise warnings" in perl5004delta

Each new perl version tends to remove some undesirable warnings, while adding new warnings that may catch

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