Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Declaring with my, assigning, and testing in same line

by AnomalousMonk (Archbishop)
on Dec 11, 2015 at 18:56 UTC ( [id://1150063]=note: print w/replies, xml ) Need Help??


in reply to Re: Declaring with my, assigning, and testing in same line
in thread Declaring with my, assigning, and testing in same line

... the issue is the way doublequotes are interpolated.

No, per tye above, the problem is with scoping within a statement:

c:\@Work\Perl\monks>perl -wMstrict -le "my %foo = qw(do done eggs ham was were); ;; my @v; (@v = keys %foo) == 1 or warn qq{Got more than one: @v}; print qq{V:@v}; " Got more than one: eggs was do at -e line 1. V:eggs was do


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-24 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found