in reply to Re^2: Perl backticks and GREP?
in thread Perl backticks and GREP?
Unquoted string "dev" may clash with future reserved word at ./nelson. +pl line 15. Unquoted string "null" may clash with future reserved word at ./nelson +.pl line 15. ... Argument "dev" isn't numeric in division (/) at ./nelson.pl line 15, < +ARGUMENTS> line 1. Argument "" isn't numeric in division (/) at ./nelson.pl line 15, <ARG +UMENTS> line 1. Illegal division by zero at ./nelson.pl line 15, <ARGUMENTS> line 1.
All of the above are generated by the /dev/null you have marooned outside the backticks. Are you attempting to redirect the output of grep?
You don't seem to have initialised $file or $argument anywhere before trying to use them.Use of uninitialized value in scalar assignment at ./nelson.pl line 8, + <ARGUMENTS> line 1. Use of uninitialized value in scalar assignment at ./nelson.pl line 9, + <ARGUMENTS> line 1.
grep: : No such file or directory
I don't think you should be escaping the variables inside the backticks. They need to interpolate.
I hope these points help you move forward.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Perl backticks and GREP?
by jakobi (Pilgrim) on Oct 19, 2009 at 20:22 UTC |