Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: open and read text file

by afoken (Chancellor)
on Jul 25, 2017 at 06:21 UTC ( [id://1195944] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    /tmp>cat shebang.pl
    #!/no/such/perl -w
    ...
    -bash: ./shebang.pl: /no/such/perl: bad interpreter: No such file or d
    +irectory
    
    /tmp>
    
  2. or download this
    /tmp>cat shebang.pl
    #!/etc/passwd
    ...
    -bash: ./shebang.pl: /etc/passwd: bad interpreter: Permission denied
    
    /tmp>
    
  3. or download this
    /tmp>cat shebang.pl
    
    ...
    ./shebang.pl: line 8: print: command not found
    
    /tmp>
    
  4. or download this
    /tmp>echo 'pstree -Aal' >> shebang.pl
    
    ...
      .
      .
      .
    
  5. or download this
    /tmp>perl -e '$_=<STDIN>;print ord $_' < shebang.pl
    10
    /tmp>