On 2/1/07, Brad Cahoon <[EMAIL PROTECTED]> wrote:

Use of uninitialized value in concatenation (.) or string at rename.pl line 15,
<DATA> line 70.

That "uninitialized value" is undef -- meaning you used some variable
before you put a value into it.

        open DATA, "$arg";

You should really check the return value from open, in case it didn't
work. And what are those quote marks doing?

        $newname = "$lead-$refno$end";

This looks like it's around line 15 and you're using some values in a
string; did you assign values to these variables? You can even use
assertions, so you'll know which one was missing:

   die "Oops: no \$lead" unless defined $lead;
   die "Oops: no \$refno" unless defined $refno;
   die "Oops: no \$end" unless defined $end;

It can also be handy to step through your code in the debugger, since
you can check the values of variables at runtime to see whether
they're what you expected.

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to