Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Are you sure you want splitdir/catfile and not splitpath/catpath?

    • To be honest, I use those so seldom, I never really paid attention to the difference.

      Making both of those changes results in a lot of uninit value warnings from catpath, even though the tests pass :/

      sub catpath {
          my ($self,$volume,$directory,$file) = @_;

          # this gives me uninit warnings
          if ( $directory ne ''                &&
               $file ne ''             

      • Huh, what are you passing to it?

        • Er, um, really wish I had read the documentation rather than doing a quick %s/one/fortheother/. *blush*.

          • Heh. That’s what I meant by “Unix blinders” – and not pejoratively, as I used to wear them for the longest time myself. Unix is so nicely simple: no volumes, no distinct namespaces for file and directory names, just one uniform hierarchy… after a while one forgets the bizarre things that exist elsewhere.

    • I think it's actually spelled:

      use File::Basename;