Dear All

I am trying to run the script below, but I always get the following error:

[EMAIL PROTECTED] scripts]$ secondperl
Global symbol "$greeting" requires explicit package name at /home/paulus/scripts/secondperl line 6.
Global symbol "$greeting" requires explicit package name at /home/paulus/scripts/secondperl line 7.
Execution of /home/paulus/scripts/secondperl aborted due to compilation errors.


The script is:

#!/usr/bin/perl
use warnings;
use strict;

$greeting = "World";
print "It matches\n" if "Hello World" =~ /$greeting/;

Any ideas?

Thanks in advance,

Paul


-- 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