Login
Search
Welcome to the iTechForums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 1
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2008, 05:04 PM
ArnArn ArnArn is offline
Member
 
Join Date: May 2008
Posts: 30
Default

perl command?


File:
are you here now
are you here now
are you here now
are you here later
are you here later
are you here later
are you here now
are you here later
e you here now

Code:
open (FILEHANDLE, "< test.txt") or die "oops: $!";
while(<FILEHANDLE>)
{
my $char = getc FILEHANDLE;
print $char;
}
close(FILEHANDLE);

Output:
aaaaaaaea

I'm only getting the first character of each line but I want to print or store or output the word "here". Can someone please help???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
perl command? ArnArn Perl 2 05-13-2008 08:20 AM
Javascript command line? drp2309s JavaScript 0 05-10-2008 01:35 PM
-f command does not work for my SSH - Unix.? Eylül UNIX 0 05-07-2008 12:14 AM
Help with system command in perl on windows? neverknew Perl 1 05-06-2008 08:49 PM
can't run this command on oracle help !!!!!!!? akademiks_98 Oracle 0 05-06-2008 12:40 PM

Your Ad Here

All times are GMT. The time now is 10:50 AM.