"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, but preserving case on the RHS?" in perlfaq6

# finish up with any remaining new (for when new is longer than old) if ($newlen > $oldlen) { ... } elsif ($state == 2) { substr($new, $oldlen) = uc(substr($new, $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 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 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.

"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 ... :// .

"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 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 ... use IO::File; $fh = IO::File->new_tmpfile() or die "Unable to make new temporary file: $!

"Who supports Perl? Who develops it? Why is it free?" in perlfaq1

See perlhist (new as of 5.005) for Perl's milestone releases. ... You may snoop on pending developments via nntp:// and the Deja News archive

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

"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 cross-reference my Perl programs?" in perlfaq3

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

"What is perl6?" in perlfaq1

interface to allow most XS modules to work unchanged, albeit perhaps without the efficiency that the new ... New features in Topaz are as yet undetermined, and will be addressed once compatibility and performance

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

works 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 can I open a file with a leading ">" or trailing blanks?" in perlfaq5

; For more information, see also the new perlopentut if you have it (new for 5.006).

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



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.

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

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.

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

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.

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

tie - bind a variable to an object class

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

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

sort - sort a list of values

first integer after the first = sign, or the # whole record case-insensitively otherwise @new ... $#old ]; # same thing using a Schwartzian Transform (no temps) @new = map { $

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.


do not work under OS/390 & VM/ESA Unix and on the Macintosh; you probably don't want to use them in new

crypt - one-way passwd-style encryption

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

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

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

open - open a file, pipe, or descriptor

open(LOG, '>>/usr/spool/news/twitlog'); # (log is reserved) # if the open fails, output is discarded ... In the child process the filehandle isn't opened--i/o happens from/to the new STDOUT or STDIN.


perldelta - what's new for perl5.005

See "New INIT keyword", "New lock keyword", and "New qr// operator". ... See "New Diagnostics". Licensing Perl has a new Social Contract for contributors.

perlmodlib - constructing new Perl modules and finding existing ones

For example, does your application still work if you change: $obj = new YOURCLASS; into: $obj = new SUBCLASS ... Don't delete the original .pl file till the new .pm one works!

CGI::Switch - Try more than one constructors and return the first object available

available SYNOPSIS use CGISwitch; -or- use CGI::Switch This, That, CGI::XA, Foo, Bar, CGI; my $q = new ... CGI::Switch; DESCRIPTION Per default the new() method tries to call new() in the three packages Apache

Dumpvalue - provides screen dump of Perl data.

SYNOPSYS 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

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.

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.

perlxs - XS language reference manual

delete THIS; If the function's name is new then the C++ new function will be called to create a dynamic ... color * color::new() The 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

ExtUtils::Packlist - manage .packlist files

The new() method returns a reference to a hash. ... If no file is specified, the .packlist specified to new() will be read.

IO::Select - OO interface to the select system call

CONSTRUCTOR new ( [ HANDLES ] ) The constructor creates a new object and optionally initialises ... socket $new = $lsn->accept; $sel->add($new); } else {

IO::Socket - Object interface to socket communications

(see the Symbol package). new optionally takes arguments, these arguments are in key-value pairs. new ... In a scalar context the new socket is returned, or undef upon failure.

perlguts - Perl's Internal Functions

The six routines are: SV* newSViv(IV); SV* newSVnv(double); SV* newSVpv(char*, int); SV* newSVpvn ... void* New( x, void *ptr, int size, type ) newAV Creates a new AV.

perlobj - Perl objects

Here is a typical constructor: package Critter; sub new { bless {} } That word new isn't special. ... Saying new Critter ('Bam' x 2), 1.4, 45 would be equivalent to Critter->new('Bam' x 2), 1.4, 45 which

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


"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 Diagnostics" in perl5004delta

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

"New builtin methods" in perl5004delta

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

"New and changed builtin constants" in perl5004delta

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

"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 and changed builtin functions" in perl5004delta

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

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

"Documentation Changes" in perl5004delta

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

"More precise warnings" in perl5004delta

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

"Support for More Operating Systems" in perl5004delta

Support for More Operating Systems Support for the following operating systems is new in Perl 5.004.

"Math::Trig" in perl5004delta

Math::Trig This new module provides a simpler interface to parts of Math::Complex for those who need

"C Language API Changes" in perl5004delta

perl_eval_pv A new function handy for eval'ing strings of Perl code inside C code. ... New extensions must use the new hash access functions and macros if they wish to use SV* keys.

"Utility Changes" in perl5004delta

Sends converted HTML to standard output The pod2html utility included with Perl 5.004 is entirely new

"pod2html" in perl5004delta

Sends converted HTML to standard output The pod2html utility included with Perl 5.004 is entirely new

"Internal change: FileHandle class based on IO::* classes" in perl5004delta

We suggest, but do not require, that you use the IO::* modules in new code.

""Can't locate in @INC" error now lists @INC" in perl5004delta in @INC" error now lists @INC Compilation option: Binary compatibility with 5.003 There is a new

"Compilation option: Binary compatibility with 5.003" in perl5004delta in @INC" error now lists @INC Compilation option: Binary compatibility with 5.003 There is a new

"Fcntl" in perl5004delta

Fcntl New constants in the existing Fcntl modules are now supported, provided that your operating system

"Changes to tainting checks" in perl5004delta

The new restrictions when tainting include: No glob() or <*> These operators may spawn the C shell

"Pragmata" in perl5004delta

Pragmata Six new pragmatic modules exist: use autouse MODULE => qw(sub1 sub2 sub3) Defers require

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