Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^6: write and read the same file not display the output

by Kenosis (Priest)
on Sep 05, 2012 at 04:53 UTC ( #991736=note: print w/ replies, xml ) Need Help??


in reply to Re^5: write and read the same file not display the output
in thread write and read the same file not display the output

$1 is initialized via regex captures which use parentheses. For example, in the following:

my $string = 'Frank'; my $name = 'Frank'; print $1 if $string =~ /^$name$/; print $1 if $string =~ /^($name)$/;

The first print statement produces:

Use of uninitialized value $1 in...

Whereas, the second print shows the value in $1:

Frank


Comment on Re^6: write and read the same file not display the output
Select or Download Code
Replies are listed 'Best First'.
Re^7: write and read the same file not display the output
by Rudolf (Monk) on Sep 05, 2012 at 13:09 UTC

    ahh I see, thats valuable information I lost along the way haha thank you for taking the time to explain. Enjoy your week! -Rudolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991736]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2015-08-27 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (330 votes), past polls