Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

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

Could it be the nature of the test?

Running your code seems to me to show that -- as asserted with respect to the use of forward slashes in windows -- M$ sees the two as equivalent (or "equal?") while perl does not. *1

*1UPDATE! Sloppy language on my part. Insert "paths" before the closing double-hyphen. See, especially, eyepopslikeamosquito's at this node.

Formatting in the code, the end block, etc. solely to make my reading of it easier.

#!/usr/bin/perl -w use strict; #1176161 my $x = qq{Z:\/Partners\/Wilsons\/2push_test}; my $y = 'Z:\Partners\Wilsons\2push_test'; print qq{'$x' '$y'}; print "\n\t"; END { print "Not equivalent! \n" unless $x eq $y; } END { # multiple end blocks are executed in rev +erse order if ($!) { print "Error is $!, \n"; } else { print "No (perl) error found.\n\t Done with the second END bl +ock\n\n"; } } exit();
and output, as expected:
C:\Users\wheelerw>D:\_Perl_\PMonks\1176161.pl 'Z:/Partners/Wilsons/2push_test' 'Z:\Partners\Wilson No (perl) error found. Done with the second END block Not equivalent!

In reply to Re^3: windows perl and paths by ww
in thread windows perl and paths by flieckster

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 pondering the Monastery: (4)
As of 2024-04-26 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found