The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-19-2008
adc22 adc22 is offline
Registered User
  
 

Join Date: Nov 2008
Location: Bangalore, India
Posts: 15
Perl cmds doesn't work in Bash shell . Plz help

Hi everyone,
I have a Linux OS in my PC (older version 9). Its default shell is bash. Whenever I try to run some Perl program it throws error ! eg, if I run this simple PERL program ,

#!/usr/bin/perl

printf "\lHello \n";

$var=3 ;
printf $var;

@list=(1,2,3);
printf "@list";
------------------------ it says -
in Bash =3 command is not found and the last two lines have syntax error !

I tried it in cygwin also & got the same error (its default shell is also bash). But in my Office -PC, no error is observed.
How to tackle with this situation? should I get the latest version of Linux on which PERL can run without error ?
Please help.