1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Someone plz help with my first pl script

Discussion in 'Perl' started by sakthi.abdullah, Mar 24, 2007.

  1. sakthi.abdullah

    sakthi.abdullah New Member

    Joined:
    Mar 15, 2007
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    0
    This is the program:

    #!/usr/bin/perl -w
    use warnings;
    print "Your name please";
    $name = <STDIN>;
    chomp( $name );
    print "Hello $name Welcome to the world of perl\n"


    I m getting this error ...
    username.pl[2]: use: not found.
    Your name please
    username.pl[4]: Syntax error at line 5 : `;' is not expected.


    Is there any problem with this script..
    or any other probs..
    I suspect some problem with perl executable ... but i dont know how to fix it.

    Guys plz help.

    Thanks .

    Sakthi.Abdullah
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    What OS are you using??
     
  3. sakthi.abdullah

    sakthi.abdullah New Member

    Joined:
    Mar 15, 2007
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    0
  4. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    try installing the latest distibution of Perl.
     

Share This Page