on Thu, 20 Jun 2002 18:16:59 GMT, Bo Mangor wrote:
> I have a file input where I split the file into an array and that works
> fine, but there is some "spam" in the beginning of the file I want to
> get rid of - the problem is that I never know how many lines there is
> with this "spam"!
>
> Therefore I want to make a check that excludes all lines there doesn't
> start with a number
> [...]
> How do I make this check In Perl?
#! perl -w
use strict;
while (<DATA>) {
last if /^\d+/;
}
do {
print; # or do something else with $_
} while (<DATA>);
__DATA__
spam spam spam
more spam
1 no spam
2 no spam either
25455487 and this neither
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]