Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

revdiablo's scratchpad

by revdiablo (Prior)
on Jun 01, 2004 at 17:23 UTC ( #358283=scratchpad: print w/ replies, xml ) Need Help??

Copying variables the hacktastic way:
#!/usr/bin/perl -l sub foo { open "/foo"; print 0+$!, " $!"; print 0+$_[0], " $_[0]"; } # not copied mkdir "/foo"; foo $!; print "---"; # copied with string interpolation mkdir "/foo"; foo "$!"; print "---"; # copied with temp scalar mkdir "/foo"; foo ${ \(my $t = $!) }; print "---"; # copied with array deref mkdir "/foo"; foo @{[$!]};

And the output:

2 No such file or directory 2 No such file or directory --- 2 No such file or directory 0 Permission denied --- 2 No such file or directory 13 Permission denied --- 2 No such file or directory 13 Permission denied
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (15)
As of 2015-07-08 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls