%perl script.pl 7 12 5 or %perl script.pl < text.txt #where the contents of the text file are 7 12 5 #### 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