Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: String assignment oddity

by Eily (Monsignor)
on Mar 02, 2018 at 14:44 UTC ( [id://1210234]=note: print w/replies, xml ) Need Help??


in reply to String assignment oddity

Well I don't see anything in your code that would explain how $form{source} would look the same but give a different result. I do see that there is no "else", are you sure that you never fall in those cases? You could add else { die "This shouldn't happen" } just to be 100% sure. Also rather than print the values, you can use Data::Dump (or Data::Dumper with $Data::Dumper::Useqq) to see exactly what is in the string (eg: make invisible chars explicit). You can also let perl itself check if the two strings are identical, with the ^ to show exactly where the difference is:

my $form_source = "files/blanks/state/$state/$type/contract.pdf"; die pp $form_source ^ $form{source} unless $form_source eq $form{sourc +e}; # pp from Data::Dump

If all of this fails, you'll have to show more code.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-24 22:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found