where the $. variable comes in right
handy. (See perldoc perlvar for way more info on this and the various
ways using it can bite you when you're least expecting it.)
Cheers,
Bill
--
Bill Stilwell
[EMAIL PROTECTED]
It's all margins.
Oh, just read my weblog: http://www.marginalia.org
On Fri, Jun 01, 2001 at 02:39:31PM -0700, Bill Stilwell wrote:
How embarrasing. My first post and I left out a semi-colon. It's
there now.
> my $new_file;
> open IN, $file or die "$file: $!\n";
> while () {
> if ($. == 1) {
> $new_file = $_;
> } els
}{title}; # or do whatever to this data
}
Now you don't need to fuss with array size or index values at all.
Hope this helps!
Bill
--
Bill Stilwell
[EMAIL PROTECTED]
It's all margins.
Oh, just read my weblog: http://www.marginalia.org
ove.
Just as an additional note, I've found that putting
use diagnostics;
in all my programs during development is very helpful. This basically
gives you verbose descriptions of the error messages you're experiencing
and will often pinpoint what is wrong. It also means you don't have