Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.


In reply to Re: String assignment oddity by Eily
in thread String assignment oddity by writch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found