Hi,

running the command:
date|awk '{print $2,$3}'

provides me with the output I require (i.e. the month and day, May 6).

however, when I try to call this from within a perl script:
system("date|awk '{print $2,$3}'");

I get:
awk: syntax error near line 1
awk: illegal statement near line 1


any ideas? alternatively, does anyone have another way to generate the date
in this format that I can assign to a variable?

thanks,
Adrian
----------------------------------------------------------------------------------------------------------------------------------------------------------------

                              <<Disclaimer>>
This message contains confidential information and is intended only for the
named individual.  If you are not the named addressee, you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this message in error and delete
this e-message from your system.

E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, delayed in
transmission, incomplete, or may contain viruses. The sender therefore does
not accept liability for any errors or omissions in the contents of
this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version. This message
is provided for informational purposes and should not be construed as a
solicitation or offer to buy or sell any securities or related financial
instruments.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to