Re: MP3::Tag and Reading values from a Hash

2006-10-22 Thread xavier mas
A Diumenge 22 Octubre 2006 18:38, Gav Ford va escriure: > Hello, > > I'm just starting out here and hope someone can help, I think I've > gotten all confused over how to read values from a Hash. > > Or it could be I've just got totally the wrong end of the stick. > > The data in question is the alb

MP3::Tag and Reading values from a Hash

2006-10-22 Thread Gav Ford
Hello, I'm just starting out here and hope someone can help, I think I've gotten all confused over how to read values from a Hash. Or it could be I've just got totally the wrong end of the stick. The data in question is the album art attached to an MP3 file. I'm trying to read it from the

Re: reg expression again

2006-10-22 Thread chen li
--- Robin Sheat <[EMAIL PROTECTED]> wrote: > On Monday 23 October 2006 12:37, chen li wrote: > > my $file_name='OT-q1.001'; > > > > if ($file_name=~/(OT)*.(\d+$)/){ > Maybe you mean: > if ($file_name=~/^OT.*\.(\d+$)/){ > Thank you and it is what I want. Li

Re: reg expression again

2006-10-22 Thread John W. Krahn
chen li wrote: > Hi all, Hello, > I write a small script as follows: > > use strict; > use warnings; > > my $file_name='OT-q1.001'; > > if ($file_name=~/(OT)*.(\d+$)/){ > print "find it\t $file_name"; > }else {print "No math";} > > The problem is that it also macth the following > st

reg expression again

2006-10-22 Thread chen li
Hi all, I write a small script as follows: use strict; use warnings; my $file_name='OT-q1.001'; if ($file_name=~/(OT)*.(\d+$)/){ print "find it\t $file_name"; }else {print "No math";} The problem is that it also macth the following string: my $file_name='I:/Common/Notebooks/Trans10C.

Re: reg expression again

2006-10-22 Thread Robin Sheat
On Monday 23 October 2006 12:37, chen li wrote: > my $file_name='OT-q1.001'; > > if ($file_name=~/(OT)*.(\d+$)/){ Maybe you mean: if ($file_name=~/^OT.*\.(\d+$)/){ -- Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]> Hostes alienigeni me abduxerunt. Qui annus est? PGP Key 0xA99CEB6D = 595

Re: reg expression again

2006-10-22 Thread chen li
--- "John W. Krahn" <[EMAIL PROTECTED]> wrote: > chen li wrote: > > Hi all, > > Hello, > > > I write a small script as follows: > > > > use strict; > > use warnings; > > > > my $file_name='OT-q1.001'; > > > > if ($file_name=~/(OT)*.(\d+$)/){ > > print "find it\t $file_name"; > > }e

Re: Error Handling

2006-10-22 Thread Jen Spinney
On 10/22/06, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 10/22/06, Jen Spinney <[EMAIL PROTECTED]> wrote: > if (!exists $hash_ref->{color} || > !exists $hash_ref->{phone} || > !exists $hash_ref->{url} || > !exists $hash_ref->{someKey}) > { > die "mySub not prov

Re: Error Handling

2006-10-22 Thread Tom Phoenix
On 10/22/06, Jen Spinney <[EMAIL PROTECTED]> wrote: if (!exists $hash_ref->{color} || !exists $hash_ref->{phone} || !exists $hash_ref->{url} || !exists $hash_ref->{someKey}) { die "mySub not provided complete hash ref"; } Maybe this (untested)? die "

Re: To shebang or not to, and script feedback.

2006-10-22 Thread Jen Spinney
On 10/21/06, xavier mas <[EMAIL PROTECTED]> wrote: A Dissabte 21 Octubre 2006 10:31, Shawn Milochik va escriure: > Hello all. I've been spending too much money lately on Amazon buying > Perl books. Recently, I've been playing with scripts downloaded from > the Web site of a book I'm going throug

Error Handling

2006-10-22 Thread Jen Spinney
Hello all. I have a subroutine that I want to send a bunch of arguments/parameters to. I find it easier to pass a hash ref to this sub instead of comma separated arguments because then I don't have to remember the order, and the intention of each argument is clearer. Within this sub, I want to c

Re: whiling through an array

2006-10-22 Thread D. Bolliger
Kathryn Bushley am Samstag, 21. Oktober 2006 21:43: > Hello again, > > Thanks Tom Pheonix...I had put in a forward in place of backwards > slash...always a stupid mistake...one more question...I am able to > substitute the first value in my hash %id_global but doesn't substitute the > rest I think