I know there is something lame that I'm not doing right but the perl basics on how to handle something so simple is bypassing my little brain....Thanks for any help!#!/usr/bin/perl -w print "File name to renumber:"; my $file = <STDIN>; open (FILE, "$file") || die $!; $|++; my $line = 0; while (<FILE>) { next if /^%/ ; s/^(?:N\d+\s?)?(?{$line++})/N$line / ; } continue { print FILE; close FILE; }
In reply to File Handle Basics by airblaine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |