Front page | perl.beginners |
Postings from December 2003
Perl defined variables
Thread Next
From:
Perl
Date:
December 23, 2003 17:04
Subject:
Perl defined variables
Message ID:
20031224010432.3932.qmail@web21502.mail.yahoo.com
Hi,
could anybody please illustrate with an example the
use of the following variables :
$/
$*
or more specifically here is the code i have.
what exactly would the following accomplish ?
$/ = "Begin";
$* = 1 ;
while (<>) {
if (/$pattern/){
print;
}
}
my understanding is
$/ = "Begin"
treats the word "Begin"as delimiter instead of "\n"
and treats the entire content between two "Begin" s as
one single line.
how does setting "$*" to a particular value alter
anything here ? hope i am making myself clear ....
thanks,
S.
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
Thread Next
-
Perl defined variables
by Perl