Hi again Great thanks to all the quickly answers! I tried a couple of them and - yes it works - thanks!
But how does it work? "if(string =~/^[0-9]/)" The part string =~/^[0-9]/ - does it split the string into single numbers and check if each of them is a part of the list [0-9] ?? I want to be scour that I have understood the Principe correct. Best regards Bo -----Oprindelig meddelelse----- Fra: Christopher G Tantalo [mailto:[EMAIL PROTECTED]] Sendt: 20. juni 2002 20:25 Til: Bo Mangor Emne: Re: number Bo Mangor wrote: > Hi there > > I'm a new bird to Perl - and I have a little problem. > > 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 in other languages I would make a check like > > If (! isNaN(string)) { > .... > } > > How do I make this check In Perl? if(string =~/^[0-9]/) { # do something # number at start of string... } else { # do something else } that should work > > I haven't been able to find something similar in Perl, but I know that > it should be possible. > > Best regards > Bo > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- ------------------------------- Just Your Friendly Neighborhood _SPIDEY_ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]