SEARCH RESULTS

FAQ

"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 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 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 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, '>', "$file.new" or die "Can't write new file: $!" ... open my $out, '>', "$file.new" 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('www.perl.com:80') or die "can't connect

"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

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

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

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

Functions

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 ... " function: use Fcntl 'SEEK_CUR'; sub systell { sysseek($_[0], 0, SEEK_CUR) } Returns 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.

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

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

opendir - open a directory

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

sort - sort a list of values

$1 : undef ); push @caps, uc($_); } my @new = @old[ sort { $nums[$b] <=> $nums ... $#old ]; # same thing, but without any temps @new = map { $_->[0] } sort { $b

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.

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

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

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

require - load in external functions from a library at runtime

Here is a typical code layout: # In Foo.pm package Foo; sub new { ... } sub Foo::INC ... my ($self, $filename) = @_; ... } # In the main program push @INC, Foo->new

sysopen - open a file, pipe, or descriptor

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

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

Documentation

feature - Perl pragma to enable new features

NAME feature - Perl pragma to enable new features SYNOPSIS use feature qw(switch say); given ($foo ... New syntactic constructs, or new semantic meanings to older constructs, can be enabled by use feature

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

NAME perldelta - what is new for perl v5.14.2 DESCRIPTION This document describes differences between ... Removed Modules and Pragmata None Platform Support New Platforms None Discontinued Platforms None

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

Encode::Alias - alias definitions to encodings SYNOPSIS use Encode; use Encode::Alias; define_alias( "newName ... 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

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

5.8, thread programming has been available using a model called interpreter threads which provides 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

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

If you're writing new code consider using TAP::Harness directly instead. ... See "new" in TAP::Formatter::Base.

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

perlmroapi - Perl method resolution plugin interface

NAME perlmroapi - Perl method resolution plugin interface DESCRIPTION As of Perl 5.10.1 there is a new

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

Perldeltas

"New Diagnostics" in perl5138delta

New Diagnostics There is a new "Closure prototype called" error [perl #68560].

"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 a UTF-8 locale was detected by perl at startup.

"New Diagnostics" in perl51310delta

New Diagnostics "\b{" is deprecated; use "\b\{" instead "\B{" is deprecated; use "\B\{" instead Use ... entry containing an object with a destructor that creates a new entry containing an object....

"New APIs" in perl5140delta

Internal Changes New APIs CLONE_PARAMS structure added to ease correct thread creation Modules that ... create threads should now create CLONE_PARAMS structures by calling the new function Perl_clone_params_new

"New Errors" in perl5140delta

New Diagnostics New Errors Closure prototype called This error occurs when a subroutine reference ... entry containing an object with a destructor that creates a new entry containing an object etc.

"New Diagnostics" in perl5140delta

New Diagnostics New Errors Closure prototype called This error occurs when a subroutine reference ... entry containing an object with a destructor that creates a new entry containing an object etc.

"New Documentation" in perl5101delta

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

"New Documentation" in perl5137delta

New Documentation perlpodstyle New style guide for POD documentation, split mostly from the NOTES section

"New Diagnostics" in perl5120delta

New or Changed Diagnostics New Diagnostics SV allocation tracing has been added to the diagnostics ... See perldiag for details of these new messages.

"New Diagnostics" in perl5135delta

New Diagnostics Parsing code internal error (%s) New fatal error produced when parsing code supplied

"New Tests" in perl571delta

New Tests Many new tests have been added.

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

"Calling conventions for newFOROP and newWHILEOP" in perl5140delta

Calling conventions for newFOROP and newWHILEOP The way the parser handles labels has been cleaned up ... The newWHILEOP() and newFOROP() functions no longer accept a line number as a parameter.

"New Documentation" in perl5110delta

New Documentation perlhaiku This contains instructions on how to build perl for the Haiku platform ... perlmroapi This describes the new interface for pluggable Method Resolution Orders.

"New Diagnostics" in perl5141delta

New Diagnostics None

"New Documentation" in perl5141delta

Documentation New Documentation None

"New Platforms" in perl5141delta

Platform Support New Platforms None

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