Thread: Read column

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    1
    Rep Power
    0

    Read column


    Hi Guy,
    Sorry for confusing and I am new to Perl scripting and I am writing a script to read a file which has the employee info, here is the table

    FullName
    Lisa Tom
    Peter Jackson

    I wan be able to read only both names.

    thx
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    830
    Rep Power
    496
    This is a cross post of the Perl Gurus forum. Please refer to it for better programming practices.

    The requirement is slightly clearer here than on the Perl Gurus forum, but I still don't know clearly what you really want to print.

    Looking at your command line, I doubt that this prints anything, because "-n" cannot be equal to "n".

    Also, at ther very least, change:

    Code:
    !/usr/bin/perl
    to something like

    Code:
    #!/usr/bin/perl
    Otherwise, it won't even compile.

    Having made all the necessary corrections, the program should print the first word of each line.

IMN logo majestic logo threadwatch logo seochat tools logo