Loading ...
Sorry, an error occurred while loading the content.
 

forget last question, but what is this: $MyVar =~ /([\w\-\=\+\/]+)\.(\w+)/;

Expand Messages
  • Franki
    Hi all I redid that last grep script using patter matching, only to find out that grep wasn t the problem. Sorry for posting a question that didn t require
    Message 1 of 6 , Oct 12, 2001
      Hi all

      I redid that last grep script using patter matching, only to find out that
      grep wasn't the problem.
      Sorry for posting a question that didn't require answering.

      So I am trying to find out what could be causing the probs...

      There is a heap of regex, the only bit of which I don't understand is this:

      $MyVar =~ /([\w\-\=\+\/]+)\.(\w+)/;

      can anyone enlighten me?

      hope I haven't scared everyone off the list with dumb questions... :-)
      I should stick to the linux lists, at least I am useful there...


      rgds

      Frank





      -----Original Message-----
      From: Franki [mailto:frankieh@...]
      Sent: Saturday, 13 October 2001 2:20 AM
      To: perl-beginner@yahoogroups.com
      Subject: [PBML] replacing grep with File::Find


      Hi again ladies and gents,

      I have this snipped of code...


      opendir (USER_FILES, "$user_files_directory_path") ||
      &file_open_error("$user_files_directory_path", "Delete Old Carts", __FILE__,
      __LINE__);
      @carts = grep(/\.[0-9]/,readdir(USER_FILES));
      closedir (USER_CARTS);


      It basically opens a directory, and creates an array of all the files in
      that directory using grep...
      Then closes the directory.

      Not being able to find much on how well activeperl grep compares to unix
      grep, I am not sure that this will work on
      windows machines, (tests seem to show that its not working real well.... :-)

      (I tried perldoc -f grep and didn't get alot of useful info from it...)

      I am trying to work out the easiest way to get this sorted... looking though
      the archives of this list, I
      see lots of references to glob and File::Find so now I am not sure which is
      the simpliest method to use...


      can anyone give me a pointer in the right direction of my studies of this?
      whats the shortest simpliest solution
      I should study up on??


      rgds


      Frank Hauptle
      Network Payment Solutions.





      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    Your message has been successfully submitted and would be delivered to recipients shortly.