Hi All,
I am finding it difficult to use the date funtion inside another perl program.
system('perl -e 'print time(localtime() - 86400) . "\n" ' ' )
The above gives yesterday's date when running from the command prompt.
When I call it inside another perl script the it is showing the syntax error.
Backslash found where operator expected at megh.pl line 5, near ""perl -e 'print time(localtime() - 86400) . "\"
(Missing operator before \?)
String found where operator expected at megh.pl line 5, near "n" ' > datefile""
syntax error at megh.pl line 5, near ""perl -e 'print time(localtime() - 86400) . "\"
system(
Backslash found where operator expected at megh.pl line 5, near ""perl -e 'print time(localtime() - 86400) . "\"
(Missing operator before \?)
String found where operator expected at megh.pl line 5, near "n" ' > datefile""
syntax error at megh.pl line 5, near ""perl -e 'print time(localtime() - 86400) . "\"
Regards
Megh