Sorry I missed out.

# ./test.pl -k=hello
Variable "$k" is not imported at ./test.pl line 4.
Global symbol "$k" requires explicit package name at ./test.pl line 4.
Execution of ./test.pl aborted due to compilation errors.
#

Regards,
Sarthak

-----Original Message-----
From: Sarthak Patnaik [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 29, 2007 12:05 PM
To: beginners@perl.org
Subject: perl -s and use strict


Hello,

 

I have a small script:

 

#!/usr/bin/perl -ws

use strict;

print $k;

 

As I am using "use strict;", it is giving the following message:

Variable "$k" is not imported at ./test.pl line 3.

Global symbol "$k" requires explicit package name at ./test.pl line 3.

Execution of ./test.pl aborted due to compilation errors.

 

Is there any workaround for this, so that I can use strict and -s together.

 

Regards,

Sarthak

 

 



Disclaimer

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom it is addressed.  If
you have received this communication in error, please immediately notify the
[EMAIL PROTECTED] and destroy the original message. The recipient should
check this email and any attachments for the presence of viruses.  Ness has
taken every reasonable precaution to minimize this risk, and accepts no
liability for any damage caused by any virus transmitted in this email.
Ness reserves the rights to monitor and review the content of all messages
sent to or from this E-mail address, and store them on the Ness E-mail
system.



Disclaimer

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom it is addressed.  If you 
have received this communication in error, please immediately notify the [EMAIL 
PROTECTED] and destroy the original message. The recipient should check this 
email and any attachments for the presence of viruses.  Ness has taken every 
reasonable precaution to minimize this risk, and accepts no liability for any 
damage caused by any virus transmitted in this email.  Ness reserves the rights 
to monitor and review the content of all messages sent to or from this E-mail 
address, and store them on the Ness E-mail system.

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


Reply via email to