Jordi Moles Blanco schreef:

> my $path = $ARGV[3];

  my ($path) = $ARGV[3] =~
      m{ ^            # SOB
         (            # start capturing
           (?:        # start group
               /      # a slash
               [a-z]+ # followed by 1 or more lowercase letters
           )          # end group
           +          # the group 1 or more times
         )            # end capturing
         $            # EOB
      }x;

or in shorthand: 

  my ($path) = $ARGV[3] =~ m{^((?:/[a-z]+)+)$};

  $path or die "bad path";

(untested)

-- 
Affijn, Ruud

"Gewoon is een tijger."

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to