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
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
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:
to something likeCode:!/usr/bin/perl
Otherwise, it won't even compile.Code:#!/usr/bin/perl
Having made all the necessary corrections, the program should print the first word of each line.