SyntaxFix
Write A Post
Hire A Developer
Questions
if(my $file = shift) { # if file is specified, read from that open(my $fh, '<', $file) or die($!); while(my $line = <$fh>) { print $line; } } else { # otherwise, read from STDIN print while(<>); }