Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How do I assign & substitute in one statement?

by Roy Johnson (Monsignor)
on Nov 13, 2004 at 22:22 UTC ( [id://407637]=note: print w/replies, xml ) Need Help??


in reply to How do I assign & substitute in one statement?

Predicate-for allows you to declare and modify a lexical in the same statement:
s[http://foo.bar.com/][] for (my $dirfilename = $url);
Using block-for does not put the lexical in the surrounding scope. This is an interesting difference, particularly since -MO=Deparse indicates that the above statement is translated into the block form.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-19 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found