in reply to How to take only maximum directory name by using its digits using perl?
Why is rev1.html in rev2 folder ?
| `-- rev1 | | `-- rev1.html | `-- rev2 | `-- rev1.html
Run this Short, Self Contained, Compilable, Example and see if you can spot the error in your posted code.
poj#!/usr/bin/perl use strict; while (<DATA>) { if (/rev_(\d)+/) { # what does this match ? print "'$1' matched in $_"; } } __DATA__ `-- added |-- add.txt `-- added1 |--action | |-- action.txt | `-- rev1 | | `-- rev1.html | `-- rev2 | `-- rev1.html `-- add.html
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to take only maximum directory name by using its digits using perl?
by Anonymous Monk on Mar 29, 2017 at 06:19 UTC | |
|
Re^2: How to take only maximum directory name by using its digits using perl?
by finddata (Sexton) on Mar 29, 2017 at 05:57 UTC | |
|
Re^2: How to take only maximum directory name by using its digits using perl?
by finddata (Sexton) on Mar 29, 2017 at 06:13 UTC | |
by Anonymous Monk on Mar 29, 2017 at 06:20 UTC |