James Edward Gray II <[EMAIL PROTECTED]> writes:

> This, on the other hand is a search/replace and probably works exactly
> as you expect.  The lines are preforming two different operations,
> thus the different results.

My point here is that in both cases , regardless of them being
different actions, the value returned is the same: '',

Yet one crys foul and the other silently keeps on trucking.  Both
print the same `<>'.

In both techniques all that is left to be passed to $trimmed_line is 
''.

In trying to defeat you explanation I think I proved to myself why it
is right... (I hate when that happens .... hehe) But finally I've
been made to see the difference between a null value and an
uninitiallized one.

This kind of shows the story:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#!/usr/local/bin/perl -w
$line3 = '';

@ar2 = split(/ /,$line3); ## set to null
print "[EMAIL PROTECTED] = <@ar2>\n" ;
print "\$ar2[0] = <$ar2[0]>\n";  ## uninitiallized
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OUT>>>
./sptest
@ar2 = <>
Use of uninitialized value in concatenation (.) or string at ./sptest line 6.
$ar2[0] = <>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to