in reply to PERL File Manipulation

hmmm

maybe i am misinterpreteing, but the following displays all files on screen in a directory for me.

perl -ne 'print' *


regards,

...wufnik

-- in the world of the mules there are no rules

Replies are listed 'Best First'.
Re: Re: PERL File Manipulation
by nysus (Parson) on Jul 11, 2003 at 07:51 UTC
    I get a "Can't open *: Invalid argument." error from my Windows XP machine on that one.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff";
    $nysus = $PM . $MCF;
    Click here if you love Perl Monks

      That'll be the old globbing thing then :-) Weirdly however it doesn't work either if you supply a valid filename instead of '*' - of course if you change the quotes to double ones it works fine. An illustration of the cranky nature of cmd.exe

      /J\
      
        Actually,

        perl -ne "print;" runme.bat

        worked for me. I just don't think globbing works at all. *.* didn't work either. Who knows. In my own limited experience, except for doing basic stuff like running perl script directly, cmd.exe is about useless for Perl. It's just too much of a pain to figure out all the little quoting quirks.

        $PM = "Perl Monk's";
        $MCF = "Most Clueless Friar Abbot Bishop Pontiff";
        $nysus = $PM . $MCF;
        Click here if you love Perl Monks

      perl -ne "print" *.*

      --
      Allolex