Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: String assignment oddity

by Eily (Monsignor)
on Mar 02, 2018 at 14:44 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2020-10-25 06:51 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (249 votes). Check out past polls.