Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^2: unlink($ful) does not delete

by daithimcc (Novice)
on Dec 07, 2007 at 17:58 UTC ( [id://655705]=note: print w/replies, xml ) Need Help??

in reply to Re: unlink($ful) does not delete
in thread unlink($ful) does not delete

No - that works fine for me if "f" was the name of the file. The name of the file is passed to the script from the dfil?f=abcde
In the script I then pick up the name of the file with
when I print $thef everything appears the same abcde as if I had written $thef="abcde"; printing $ful gives the path exactly as it should be - it can even be recognised by -e $ful but it is not recognised by unlink($ful)
So although they appear identical strings unlink recognises it when $thef was manually set $thef="abcde" but not when set using the parameter $thef=param('f'); even though they look identical and behave identically for -e
I even tried chomp($thef);

Thanks again for any help!

Replies are listed 'Best First'.
Re^3: unlink($ful) does not delete
by tcf03 (Deacon) on Dec 07, 2007 at 18:34 UTC
    Did you try printing them? Can you post more of the code itself?

    also adding

      use CGI::Carp qw(fatalsToBrowser);

    to the top of your program may prove useful.


    And then in your code: die unless param('f');

    "That which we persist in doing becomes easier, not that the task itself has become easier, but that our ability to perform it has improved."
      --Ralph Waldo Emerson

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://655705]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-06-15 08:35 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.