tigervamp has asked for the wisdom of the Perl Monks concerning the following question:
and the following:$count=200; $/ = \$count; open(FILE1,"a.txt"); $record=<FILE1>; close(FILE1); print $record;
but I keep getting the whole file, not a record. I tried this for Linux and Windows. What am I doing wrong?$/ = \2000; open(FILE1,"a.txt"); $record=<FILE1>; close(FILE1); print $record;
Thanks,
tigervamp
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Reading fixed length records
by tye (Sage) on May 25, 2001 at 18:27 UTC | |
|
Re: Reading fixed length records
by clintp (Curate) on May 25, 2001 at 17:16 UTC | |
by tigervamp (Friar) on May 25, 2001 at 17:37 UTC | |
|
Re: Reading fixed length records
by Trimbach (Curate) on May 25, 2001 at 17:15 UTC | |
by tigervamp (Friar) on May 25, 2001 at 17:19 UTC | |
|
Re: Reading fixed length records
by Vynce (Friar) on May 25, 2001 at 17:22 UTC | |
by davorg (Chancellor) on May 25, 2001 at 17:28 UTC | |
|
Re: Reading fixed length records
by princepawn (Parson) on May 25, 2001 at 22:59 UTC | |
by tye (Sage) on May 26, 2001 at 00:03 UTC |