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