Re: Reading the first line of a file

2005-01-19 Thread Ing. Branislav Gerzo
Stone [S], on Monday, January 17, 2005 at 16:45 (-0800) typed: >> This should be: >> if ($_ !=~ /\*{5} InTune/) { S> Please ignore this. Your use of the operator is correct. how about: unless(/\*{5} InTune/) { -- ...m8s, cu l8r, Brano. ["`Mother' is God on the lips and hearts of children.

Re: Reading the first line of a file

2005-01-17 Thread Stone
> > if ($_ !~ /\*{5} InTune/){ > This should be: > if ($_ !=~ /\*{5} InTune/) { Please ignore this. Your use of the operator is correct. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Spam:Re: Reading the first line of a file

2005-01-17 Thread Michael Kraus
G'day... > > if ($_ !~ /\*{5} InTune/){ > > This should be: > > if ($_ !=~ /\*{5} InTune/) { Should it? I always thought that !~ was the inverse of =~ I.e. $var !~ /pattern/ was the equivalent of !($var =~ /pattern/) (at least within test conditions anyway) Is there somethi

Re: Reading the first line of a file

2005-01-17 Thread Stone
> is there a way to add a -e to check to see if we have a file to unlink ? How about: open (FH, UPLOAD_DIR . "/$file") || die ( $q, "Error reading $file for test : $!" ); That will stop processing at that point, if you aren't able to open the file for any reason (like it doesn't exist). Other

Reading the first line of a file

2005-01-17 Thread David Gilden
Greetings, The second piece of code should look for "* InTune " somewhere in the first line of the file if it does not, it should unlink the bad file and fire off the error, it seems to happen all the time regardless of the match. Two quick questions here: I can't see why I am getting thi