in reply to Re^8: To read files from two dir
in thread To read files from two dir
The problem statement is a little vague. Perhaps see How to ask better questions using Test::More and sample data? Anyway here might be what you want.
use strict; use warnings; use Test::More tests => 1; my $vmstr = 'zldcdabcdef14-vos-fxohr-correlator-00'; my ($digits) = $vmstr =~ /-(\d\d)$/; my $instance = "/instance-$digits"; is $instance, '/instance-00';
🦛
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^10: To read files from two dir
by pragovnj (Acolyte) on Apr 26, 2022 at 15:05 UTC | |
by hippo (Archbishop) on Apr 26, 2022 at 15:17 UTC | |
by pragovnj (Acolyte) on Apr 26, 2022 at 15:51 UTC | |
by hippo (Archbishop) on Apr 26, 2022 at 15:58 UTC | |
by pragovnj (Acolyte) on Apr 26, 2022 at 16:31 UTC | |
|