On 2003-03-24 07:27:14 -0800, Ovid wrote:
> --- Jose Luis Martinez <[EMAIL PROTECTED]> wrote:
> > Hello Ovid
> > 
> > This is the code that I am trying to run
> > 
> > #!/usr/bin/perl
> > 
> > my $a="Hello World";
> > 
> > print $a;
> 
> There is nothing wrong with this code.  Thoughts:
> 
> * what is the result of 'which perl'?  Are you pointing to the same interpreter? 
> (though this
> should not make a difference)
> 
> * are your line endings wrong?
 
Try:


#!/usr/bin/perl

my $greeting="Hello World\n";
print $greeting;


With my shell prompt the \n in $greeting is necessary, else the output
is eaten by the prompt.

Hope this helps
                                 Morten
 
-- 
OpenPGP: 0xF1360CA9 - 8CF5 32EE A5EC 36B2 4E3F  ACDF 6D86 BEB3 F136 0CA9
         Morten Liebach <[EMAIL PROTECTED]> - http://m.mongers.org/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to