At 02:34 PM 11/29/2001 +0000, [EMAIL PROTECTED] wrote:

If all you want to do is take lines from one file and put it in another, it 
may be easier to do the following:

while ($_=<INPUT_FILE>) {
         if (length($_) > 2)             ## if there is something more than 
a blank line (assuming you don't have 2 character lines
         {
         print ILL $_;
         }
         else
         {}
}

Otherwise...
>.
>open (INPUT_FILE, "$DATA_DIR/opacrequests.LN.out")  || die "Cannot open
>$DATA_DIR/opacrequests.LN.out: $!";
>open (ILL, ">$OUT_DIR/pobk_rpt.txt") || die "Cannot open
>$OUT_DIR/pobk_rpt.txt: $!";
>while ($_=<INPUT_FILE>) {
>chop $_ ;



## I think you need to use parenthesis around $_
chop($_)

>($number, $date_time, $patron_name, $patron_barcode, $address, $field6,
>$field7, $author, $title, $place, $publisher, $edition, $date) = split
>/\t/,$_;

#same with split .... = split(/\t/, $_);

>write (ILL);

## I usually use print (I'm using WinNT). Also, I'm not sure what's getting 
printed to ILL with the write command.
print ILL "$number, $place\n";          ## or whatever values from the split.
>}
>
>but as the textfile I'm reading in from has the format;
>
>first line of text
>(blank line)
>second line of text
>
>when I write to the new textfile taking the content from the original
>textfile it's still including the blank line when I don't want it to.
>
>Can you change a delimiter?

Sure.. Do it before your while statement. And it will remain that way 
throughout your loop. It can be changed to anything (commas, semicolons, or 
even strings (I think))
Hope this helps.
Carl



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to