Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    my $line = <STDIN>;
    ...
    
    $ echo 'echo' | ./teststdin.pl 
    Line is: echo
    
  2. or download this
    $ cat echo.txt 
    echoed file
    $ ./teststdin.pl < echo.txt
    Line is: echoed file