Hwdy,
Sorry for the typo, thats what you get when you directly type
a perl script into an email without testing it first. :-(
Had a browse of one of my perl books and it states that
globbing may cause the execution of a seperate program.
Alternative:
opendir(DH, "/view/QA/vobs/QA_testing");
@fileList = grep { /\.pl$/i } readdir(DH);
closedir(DH);
Using the above allows you to use perl regex, rather than using
system specific globbing. Also, $file is an absolute name that does
not include the directory it was read from.
Cheers,
Sebastien.
----- Original Message -----
From: Vincent Murphy <vincent.murphy@cybertrust.gte.com>
To: David Stevens (rat325) <david.stevens@motorola.com>
Cc: Vincent Murphy <vincent.murphy@cybertrust.gte.com>; Sebastien Hadjifotis
<Sebastien.Hadjifotis@fujitsu.com.au>; <cciug@rational.com>
Sent: Friday, January 28, 2000 4:19 AM
Subject: Re: [cciug] Perl Help.....
> >>>>> "David" == David Stevens <david.stevens@motorola.com> writes:
>
> David> This worked for me:
> David> @fileList = <./*.pl>;
> David> foreach $file (@fileList) {
> David> print "file is: $file\n";
> David> }
>
> Since we are so off subject, why not:
>
> print map "$_\n" => <./*.pl>;
>
> Sebastien> @fileList = <"/view/QA/vobs/QA_testing/*.c>;
> ----------------------------^
> the above fails because of ".
>
> -vjm
>
>
>
>
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:22:39 EDT