On 16/10/2011 00:08, JPH wrote:
I am passin a two-dimensional array to a sub and when the sub returns,
the original array has changed. Eventually I want to pass the array into
a recursive sub, so I want to find a way to circumvent this behaviour.
Notice how my global is @a and the sub local is
Hi,
my goal is to get in a directory the following:
PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg
PIC2.JPG renamed as Gyermekolimpia_Ujvidek_002.jpg
...
PIC00223.JPG renamed as Gyermekolimpia_Ujvidek_223.jpg
So far I get this to work:
rename -n
s/.+(\d{3}).jpg/Gyermekolimpia_Ujvidek_$1.jpg/i
On Mon, Oct 17, 2011 at 11:46 AM, Csanyi Pal csanyi...@gmail.com wrote:
Hi,
my goal is to get in a directory the following:
PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg
PIC2.JPG renamed as Gyermekolimpia_Ujvidek_002.jpg
...
Leo Susanto leosusa...@gmail.com writes:
On Mon, Oct 17, 2011 at 11:46 AM, Csanyi Pal csanyi...@gmail.com wrote:
my goal is to get in a directory the following:
PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg
PIC2.JPG renamed as Gyermekolimpia_Ujvidek_002.jpg
...
PIC00223.JPG
http://perldoc.perl.org/perlre.html
s/.+(\d{3}).jpg/Gyermekolimpia_Ujvidek_$1.jpg/i
From your requirement: PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg
1. the 3 last digits should be extracted: .+(\d{3}).jpg
2. rename everything before the 3 digits to:
'Gyermekolimpia_Ujvidek_':
On Mon, Oct 17, 2011 at 9:07 PM, Csanyi Pal csanyi...@gmail.com wrote:
Leo Susanto leosusa...@gmail.com writes:
On Mon, Oct 17, 2011 at 11:46 AM, Csanyi Pal csanyi...@gmail.com
wrote:
my goal is to get in a directory the following:
PIC1.JPG renamed as Gyermekolimpia_Ujvidek_001.jpg
Hello,
I am getting the following error when I am trying to use regex to
match a pattern and then access the memory variables:
Any insight as to what I am doing wrong is greatly appreciated.
Thank you,
Chris
Use of uninitialized value $1 in hash element at ./heh.pl line 22,
$fh line 1211.
Use
From looking at the regex
if ($line =~
/17|18|19|20|21+:(\d+):(\d+)+\n+\n+CELL\s+(\d+)\s+(.+?),.+?HEH/){
against the data
10/17/11 18:25:20 #578030
25 REPT:CELL 221 CDM 2, CRC, HEH
SUPPRESSED MSGS: 0
ERROR TYPE: ONEBTS MODULAR CELL ERROR
SET: MLG BANDWIDTH CHANGE
MLG
On Tue, Oct 18, 2011 at 12:32 AM, Chris Stinemetz
chrisstinem...@gmail.comwrote:
/17|18|19|20|21+:(\d+):(\d+)+\n+\n+CELL\s+(\d+)\s+(.+?),.+?HEH/
Spot the issue:
/
17#Or
| 18#Or
| 19#Or
| 20#Or
| 21+:(\d+):(\d+)+\n+\n+CELL\s+(\d+)\s+(.+?),.+?HEH
/x
For anything