Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Declare my variable in sysread - Mojo::File::slurp

by ikegami (Pope)
on Dec 22, 2018 at 00:39 UTC ( #1227589=note: print w/replies, xml ) Need Help??


in reply to Declare my variable in sysread - Mojo::File::slurp

You say you've never seen this before, but you've done in a million times. Just look at the previous line of your code.

open my $file, ...

my $var not only declares the variable at compile-time, it also returns the variable (as an lvalue) as if you had simply written $var.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2019-12-11 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?