in reply to Diamond errors
> I could push $ARGV onto an array using eof and compare the result to @ARGV after the loop
please note that the continue will not be executed for empty files, although they exist.
LanX@MDXN MINGW64 / $ ls -l file* -rw-r--r-- 1 LanX 1049089 0 Jan 21 23:12 file1 -rw-r--r-- 1 LanX 1049089 2 Jan 21 23:13 file3 LanX@MDXN MINGW64 / $ perl -e'while(<>){1;}continue{print "---$ARGV\n" if eof;}; print $!' + file1 file2 file3 Can't open file2: No such file or directory at -e line 1. ---file3
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
|
|---|