- 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 } );
- 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' => ''
};
- or download this
> perl stdin-pipe.pl --opt Value
$VAR1 = {
...
$VAR1 = {
'Final, opt' => 'Value'
};
- or download this
> date -u | perl stdin-pipe.pl --opt X
$VAR1 = {
...
'Final, opt' => 'Wed May 3 05:44:43 UTC 2023
'
};
- or download this
> date -u | perl stdin-pipe.pl --opt
$VAR1 = {
...
'Final, opt' => 'Wed May 3 06:24:29 UTC 2023
'
};