On 11-03-14 04:49 PM, Mark wrote:
Examples where input is "provided":
perl myscript.pl input.txt
perl myscript.pl< input.txt
executable_that_writes_to_sdtout | perl myscript.pl
Example of where no input is "provided":
perl myscript.pl
my $has_input = 0;
while( <> ){
$has_input = 1;
# process the input line by line
}
if( ! $has_input ){
# do something else
}
--
Just my 0.00000002 million dollars worth,
Shawn
Confusion is the first step of understanding.
Programming is as much about organization and communication
as it is about coding.
The secret to great software: Fail early & often.
Eliminate software piracy: use only FLOSS.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/