Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Prevent Strings From Being Interpreted As A File Handle

by LanX (Saint)
on Apr 27, 2014 at 13:58 UTC ( [id://1083996]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    > cat Module.pm script.pl; perl script.pl 
    #---- Module.pm
    ...
    
    #---- output
    NO NO NO at Module.pm line 1.
    
  2. or download this
    $\="\n";
    
    ...
    print "exists TST::_ ", exists $TST::{_};
    
    print -w main::_;
    
  3. or download this
    # OUTPUT 
    exists main::_ 1
    1
    exists TST::_ 
    1
    
  4. or download this
    #5.10
                   If any of the file tests (or either the "stat" or "lsta
    +t"
    ...
                   As of Perl 5.9.1, as a form of purely syntactic sugar, 
    +you can
                   stack file test operators, in a way that "-f -w -x $fil
    +e" is
                   equivalent to "-x $file && -w _ && -f _
    

Log In?
Username:
Password:

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

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

    No recent polls found