Pedro Antonio Reche wrote:
>
> Hi All,
Hello,
> I would like to read and process line by line (using while) some text
> embeded into my perl script.
> I tried something like:
>
> #/usr/sbin/perl
>
> open(D, "__DATA__");
> while(){
There is nothing that you have to open. If you use the DATA f
You have to include the go_next; in your while loop.
Jair
- Original Message -
From: "Pedro Antonio Reche" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 06, 2003 3:40 PM
Subject: processing text in perl script
> Hi All,
>
Hi All,
I would like to read and process line by line (using while) some text
embeded into my perl script.
I tried something like:
#/usr/sbin/perl
open(D, "__DATA__");
while(){
print $_;
}
close(D);
__DATA__
This is a test
and nothing else
the execution of the prog
Jo [[EMAIL PROTECTED]] quoth:
*>
*>The original file was saved on a windows machine, and i copy/pasted it through a
linux text editor. I noticed when i edit the original file using vi, down the bottom
next to the file name is [dos]. Im thinking this has something to do with it.
http://history.
Microsoft operating systems use different characters for line endings than
unix boxes. I believe it is the equivalent to the UNIX \r\n.
-Original Message-
From: Jo [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 4:43 PM
To: PerlBeginners
Subject: Processing text
Hey all,
I
Hey all,
I'm kind of new to perl and i've come accross a problem:
I have a large text file with fields separated by pipes which should appear as:
ABIT|GC|MX200|nVIDIA GeForce 2 MX200 32MB AGP Card|75.00|74.00|73.00|10%|99.00
However alot of entries are split over 2 lines like this:
ABIT|MB|BD