Help for this page

Select Code to Download


  1. or download this
    # Some time later, changed the code to collect all the input "do { ...
    + };",
    # not just the first line of STDIN.
    ...
    }
    
    say Dumper( { 'Final, opt' => $opt } );
    
  2. or download this
    > perl stdin-pipe.pl --opt
    Neither a value was given for $opt, nor was specified on standard inpu
    +t. at stdin-pipe.pl line 25.
    ...
    $VAR1 = {
              'Initial, opt' => ''
            };
    
  3. or download this
    > perl stdin-pipe.pl --opt Value
    $VAR1 = {
    ...
    $VAR1 = {
              'Final, opt' => 'Value'
            };
    
  4. or download this
    > date -u | perl stdin-pipe.pl --opt X
    $VAR1 = {
    ...
              'Final, opt' => 'Wed May  3 05:44:43 UTC 2023
    '
            };
    
  5. or download this
    > date -u | perl stdin-pipe.pl --opt
    $VAR1 = {
    ...
              'Final, opt' => 'Wed May  3 06:24:29 UTC 2023
    '
            };