develooper Front page | perl.beginners | Postings from May 2007

Re: Passing arguments to subroutine

Thread Previous | Thread Next
From:
yitzle
Date:
May 31, 2007 07:15
Subject:
Re: Passing arguments to subroutine
Message ID:
ca5781c80705310715id79bf45p4f24c332b140c225@mail.gmail.com
On 31 May 2007 01:27:26 -0700, Alma <almatirkey@gmail.com> wrote:
-- snip --
>         unlink($file_path);
-- snip --

I'm aware that the question was already answered, but a generic tip
for the future.
You could try adding a statement like:
   print "Deleting $file_path\n";
to help debug and ensure the variable got set up properly. You can use
it to help track down the source of the problem.

Alternatively, you (and I) should learn how to use a Perl debugger ;)

@Chas: Good question... I'm fairly new to Perl and everything I know
is learnt off the web. I've done stuff like `&myFunction` for zero
param functions and going from that to `&myFunction()` isn't such a
leap.
I suspect one of the tutorials that Google or Perl.org points to has
something in it that needs correcting.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About