Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Including modules and pragmas in caller's scope via use

by peter.pl (Novice)
on Jul 31, 2014 at 03:28 UTC ( [id://1095679]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use v5.18;
    
    ...
    sub mySub {
        say "This is mySub, foo!";
    }
    
  2. or download this
    #!/usr/bin/perl
    use v5.18;
    ...
    
    open( my $dne, '<', 'nonexistentfile.txt' );
    die 'Failed to import autodie';
    
  3. or download this
    peter@hermes:~/src/Perl/test> perl myscript.pl 
    This is mySub, foo!
    ...
    Perl can't read.
    Can't open(GLOB(0x9cc7d8), <, nonexistentfile.txt): No such file or di
    +rectory at (eval 3) line 4.
            main::__ANON__('GLOB(0x9cc7d8)', '<', 'nonexistentfile.txt') c
    +alled at myscript.pl line 22
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2024-04-16 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found