Re: grabbing text between two tokens

2008-04-24 Thread Gunnar Hjalmarsson
Sharan Basappa wrote: OTOH, I don't see the point in struggling with Text::Balanced, when all you need is: my @extracted = $source =~ /covergroup.+?endgroup/gs; The example I gave is simple but will become more complex as I keep adding functionality to it. More complex input is yet to c

Re: Advice on how to approach character translation

2008-04-24 Thread Chas. Owens
On Thu, Apr 24, 2008 at 11:40 AM, R (Chandra) Chandrasekhar <[EMAIL PROTECTED]> wrote: > Chas. Owens wrote: > > > > The easiest way I can think of is to build a (UTF-8) file named > > itrans2unicode.table that looks like this > > > > a => a > > aa => ā > > ~N => ṅ > > > > > > I have successfully

Re: How to delete old directories with perl script?

2008-04-24 Thread Dr.Ruud
"Siegfried Heintze (Aditi)" schreef: > I have directory names in the format of "-mm-dd_hh-mm-ss". > Sometimes I want to delete all the non-empty directories that are > from last week or earlier. Other times I want to delete all the > directories that are over a week old. Consider IO::All.

Re: Joining/Merging AoA

2008-04-24 Thread Jay Savage
And as this is the Perl beginners list, please don't top post. 2008/4/24 Andrew Curry <[EMAIL PROTECTED]>: > As this is a beginners list are you going to explain... > > > push my @c, [EMAIL PROTECTED] @a}]; > push @{$c[0]}, (@{shift @b})[1]; > > $c[$_->[0]] = [ @{$_} ] while $_ = shift

Re: Advice on how to approach character translation

2008-04-24 Thread R (Chandra) Chandrasekhar
Chas. Owens wrote: The easiest way I can think of is to build a (UTF-8) file named itrans2unicode.table that looks like this a => a aa => ā ~N => ṅ I have successfully created the file lookup.table containing lines as suggested above with ASCII and Unicode characters separated by ' => '.

Re: grabbing text between two tokens

2008-04-24 Thread Sharan Basappa
> OTOH, I don't see the point in struggling with Text::Balanced, when all you > need is: > > my @extracted = $source =~ /covergroup.+?endgroup/gs; The example I gave is simple but will become more complex as I keep adding functionality to it. More complex input is yet to come. Also, I believe

RE: Joining/Merging AoA

2008-04-24 Thread Andrew Curry
As this is a beginners list are you going to explain... push my @c, [EMAIL PROTECTED] @a}]; push @{$c[0]}, (@{shift @b})[1]; $c[$_->[0]] = [ @{$_} ] while $_ = shift @a; push @{$c[$_->[0]]}, $_->[1] while $_ = shift @b; -Original Message- From: Jay Savage [mailto:[EMAI

Re: Joining/Merging AoA

2008-04-24 Thread Jay Savage
On Tue, Apr 22, 2008 at 2:28 AM, Vishal G <[EMAIL PROTECTED]> wrote: > Hi Guys, > > I have a little complicated problem... > > I have two arrays > > @a = ( ['id', 'name', 'age'], >['1', 'Fred', '24'], >['2', 'Frank', '42'], > ); > > @b = ( ['id', 'sex'], >

Re: Properly displaying items from hash

2008-04-24 Thread John W. Krahn
icarus wrote: I have two files: log_ca.txt and log_aa.txt contents of log_ca.txt: 3->ca_filename3 4->ca_filename4 1->ca_filename1 2->ca_filename2 contents of log_aa.txt: 1->aa_filename1 3->aa_filename3 2->aa_filename2 4->aa_filena

Re: Properly displaying items from hash

2008-04-24 Thread Gunnar Hjalmarsson
icarus wrote: I have two files: log_ca.txt and log_aa.txt contents of log_ca.txt: 3->ca_filename3 4->ca_filename4 1->ca_filename1 2->ca_filename2 contents of log_aa.txt: 1->aa_filename1 3->aa_filename3 2->aa_filename2 4->aa_filena

Re: Properly displaying items from hash

2008-04-24 Thread J. Peng
On Thu, Apr 24, 2008 at 9:35 AM, icarus <[EMAIL PROTECTED]> wrote: > I have two files: log_ca.txt and log_aa.txt > contents of log_ca.txt: > > 3->ca_filename3 > 4->ca_filename4 > 1->ca_filename1 > 2->ca_filename2 > > contents of log_aa.txt: > > 1->aa_f

Properly displaying items from hash

2008-04-24 Thread icarus
I have two files: log_ca.txt and log_aa.txt contents of log_ca.txt: 3->ca_filename3 4->ca_filename4 1->ca_filename1 2->ca_filename2 contents of log_aa.txt: 1->aa_filename1 3->aa_filename3 2->aa_filename2 4->aa_filename4 The program