On Fri, 22 Jul 2005 12:05:16 -0700, you wrote: >You want to check if it's null, not if it's defined. Defined means that the >variable exists.
Almost. Defined means the variable exists AND its value is not undef, as this snippet demonstrates: my $foo; print !defined $foo; As for the OP's question, substr() does indeed return undef if the offset and length specification refers to something completely outside the string argument. I suspect that the elements of @ARGV have newlines or other whitespace at the end that are causing a problem. -- Eric Amick Columbia, MD _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
