Hey there,<br><br>as part of a script I read a line of text into several fields using substr() this is fine except that sometimes not all fields are present on a line. Instead there are space characters.<br><br>Therefore I thought to use a substitution after I had split the string up to get rid of the whitespace:<br><br><FONT FACE=monospace>$thisfield =~ s/ //;</font><br><br>However when I then check the field:<br><br><FONT FACE=monospace>if (!($thisfield eq ""
) { do something with a non-empty string }</font><br><br>This doesn't work as even though I thought I'd got rid of the spaces $thisfield still shows up as a defined string..<br><br>Any ideas (better ways to do this?) appreciated!<br><br>Cheers<br>Loon