perlhelp
08-01-2007, 08:51 PM
Hi everyone,
I am relatively new to perl. I am trying to write a script that can access directories that have variable numbers appended to the end. For example, I have 4 directories that all have an incremental number (1->4) and then an incremental number at the end (x->x+4) that is variable. Besides that the names are identical. For example:
this_is_identical_1_more_identical_15
this_is_identical_2_more_identical_16
this_is_identical_3_more_identical_17
this_is_identical_4_more_identical_18
The 1->4 part I put in the for loop. However, how do I access the directory with an unknown number at the end? I am running this on a unix server, so it might be easiest to use the 'tab' button to autocomplete if that is in any way possible. Any ideas on how to enter these directories?
Thanks!
Marc
I am relatively new to perl. I am trying to write a script that can access directories that have variable numbers appended to the end. For example, I have 4 directories that all have an incremental number (1->4) and then an incremental number at the end (x->x+4) that is variable. Besides that the names are identical. For example:
this_is_identical_1_more_identical_15
this_is_identical_2_more_identical_16
this_is_identical_3_more_identical_17
this_is_identical_4_more_identical_18
The 1->4 part I put in the for loop. However, how do I access the directory with an unknown number at the end? I am running this on a unix server, so it might be easiest to use the 'tab' button to autocomplete if that is in any way possible. Any ideas on how to enter these directories?
Thanks!
Marc