substition in perl
- From: dennishancy@xxxxxxxxx
- Date: 31 Mar 2006 10:51:35 -0800
Trying to figure out the substitution operator in Perl.
The documentation shows the syntax as
s/PATTERN/REPLALCEMENT/
and explains that the operator searches a string for PATTERN and
replaces that match with the REPLACEMENT text.
My question then is this. What string is being searched? The
documention goes on to say that if no string is specified, the $_
variable is search.
What is the $_ variable?
Dennis Hancy
Eaton Corporation
Cleveland, OH
.
- Follow-Ups:
- Re: substition in perl
- From: Bart Van der Donck
- Re: substition in perl
- From: Paul Lalli
- Re: substition in perl
- Prev by Date: Re: multi-line regular expression help
- Next by Date: Re: multi-line regular expression help
- Previous by thread: changing .cpan location
- Next by thread: Re: substition in perl
- Index(es):
Relevant Pages
|