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

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
There is some strange behavior on File::Spec->catfile on VMS (perl, v5.8.1 built for VMS_AXP)

Whenever my path length is a multiple of 8 + 1 (or a multiple of 8+3 if you count the brackets), e.g. 9, 17, 23, the path is formed incorrectly (as shown below). It discards the second argument and forms a file path based on the first argument only.
my $path = "[DIR."; my $tmp = ""; for(my $x=0; $x<60; $x++) { $tmp .= "a"; my $tmp2 = $path . $tmp . "]"; print File::Spec->catfile($tmp2, "file") . "\n"; } ----------------------------- $ perl test.pl USERS:[DIR.a]file USERS:[DIR.aa]file USERS:[DIR.aaa]file USERS:[DIR.aaaa]file USERS:[DIR]aaaaa USERS:[DIR.aaaaaa]file USERS:[DIR.aaaaaaa]file USERS:[DIR.aaaaaaaa]file USERS:[DIR.aaaaaaaaa]file USERS:[DIR.aaaaaaaaaa]file USERS:[DIR.aaaaaaaaaaa]file USERS:[DIR.aaaaaaaaaaaa]file USERS:[DIR]aaaaaaaaaaaaa USERS:[DIR.aaaaaaaaaaaaaa]file USERS:[DIR.aaaaaaaaaaaaaaa]file USERS:[DIR.aaaaaaaaaaaaaaaa]file
I haven't been able to find anything through SuperSearch, google, cpan, etc related to this "bug". Does anyone have any idea what's going on? The next step will be to step through the Spec::File code, likely somewhere in the vmsify function or a child of it since this does not happen on UNIX.

Also, I have the latest version of File::Spec and File::Spec::VMS.

Any thoughts?

In reply to File::Spec bug on VMS by swkronenfeld

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? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2023-02-07 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (38 votes). Check out past polls.

    Notices?