So I need it to take @ARGS or the "<" redirect. If there aren't @ARGS or a "<" I need it to print a message saying "use args or <". I think I'm on the right track but it hangs if I don't "<" any text file in. I can't really get it to work.
So I have:
if(@ARGV)
{ my @node_numbers= @ARGV}
else
{ my @node_numbers = do { local $/; split ' ', <> };}
if (!@node_numbers)
{
print <<"EOF";
#####################################
#
# use args or < a text file
#
#####################################
EOF
die;
}
# Do rest of code after here using @node_numbers
|