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

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 browser:www.mydomain.com/..../ dfil?f=abcde
In the script I then pick up the name of the file with
$thef=param('f');
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.

    update

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

    Ted
    --
    "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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://655705]
help
Chatterbox?
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
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    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.