in reply to splitting/unpacking a string containing data sepearted by \0

Not to change the topic, but considering the usage of find given in this case: what's wrong with just using opendir() and readdir()?

Replies are listed 'Best First'.
Re: Re: splitting/unpacking a string containing data sepearted by \0
by revdiablo (Prior) on Feb 12, 2004 at 22:20 UTC

    I'm partial to glob, myself. e.g. @files = (glob("*"), glob(".*"));

    Update: added missing parentheses.

    Update: just for fun, and those who abhor repetition: @files = map glob, qw(* .*);

    Update: duff++

      just for fun, and those who abhor repetition: @files = map glob, qw(* .*);

      What about those of us who are lazy?

      @files = glob "* .*";
Re: Re: splitting/unpacking a string containing data sepearted by \0
by Anonymous Monk on Feb 12, 2004 at 22:09 UTC
    That's built into perl and requires you to write more code :)