need help with foreach 
Author Message
 need help with foreach

I would like to use the foreach statement, to process OpenVMS *.bck
files.  I do not want to hard-code the OpenVMS path name; i.e. I would
like to do something like this:
  foreach $bckfile (<"$path" . "*.bck">) {
where $path is something provided by the user.  I know that $path is
correct, but I must still hard-code the path name like this:
  foreach $bckfile (<abc:[def.ghij]*.bck>) {
otherwise the code in the foreach loop will not get executed.  I have
loops like this for other platforms:
  foreach $tarfile (<$path/*.tz.>) {
The above foreach works just great for UNIX.  What's the problem with my
foreach on OpenVMS?


Also, I posted an article over a week ago about parameter passing, but
nobody answered.  Either the question was too easy, or it never got

Sat, 14 Mar 1998 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. need help with foreach construct and parsing of list

2. need help with FOREACH and filename wildcards

3. Need help getting out of a foreach loop

4. foreach does not do foreach

5. a foreach within a foreach?

6. QUESTION: foreach $scalar can this be foreach $hash{ref}

7. nested foreach needed?

8. Help: a beginner cannot make for/foreach loop running

9. Help with an array and foreach


11. Help referncing outer $_ in inner foreach

12. Help with an array and foreach


Powered by phpBB® Forum Software