Re: Need a Perl Regex Help

2009-11-14 Thread Parag Kalra
Thanks 007 It worked out of the box :) Cheers, Parag On Fri, Nov 13, 2009 at 8:03 PM, 7 <7stud.7s...@gmail.com> wrote: > On Fri, Nov 13, 2009 at 5:07 AM, Parag Kalra wrote: > >> Hey All, >> >> I have a following a LDIF file to process through Perl - >> >> ###

Re: return {}->{'name'};

2009-11-14 Thread Uri Guttman
> "JP" == Jeff Pang writes: JP> On Nov 15, 2009, Uri Guttman wrote: > "PK" == Parag Kalra writes: >> and yes, that is declaring a constant. you can tell it is a hash as it >> is initialized to a hash reference. it makes little sense to me why you >> would declare such a beast

Re: Re: return {}->{'name'};

2009-11-14 Thread Jeff Pang
On Nov 15, 2009, Uri Guttman wrote: > "PK" == Parag Kalra writes: >and yes, that is declaring a constant. you can tell it is a hash as it >is initialized to a hash reference. it makes little sense to me why you >would declare such a beast as the reference can have its contents >altered a

Re: return {}->{'name'};

2009-11-14 Thread Ming Qian
Thanks Uri and Parag. After reading your comments and taking a coffee, I understand it. :) Thanks, Bruce. On Sun, Nov 15, 2009 at 12:18 AM, Uri Guttman wrote: > > "PK" == Parag Kalra writes: > > first off, as a newbie here, please learn to bottom post. reading is > done top down so put

Re: return {}->{'name'};

2009-11-14 Thread Uri Guttman
> "PK" == Parag Kalra writes: first off, as a newbie here, please learn to bottom post. reading is done top down so put your comments BELOW the quoted and edited post you are commenting about. PK> Even I am a beginer but let me throw some pointers. Experienced PK> users kindly correct me

Re: return {}->{'name'};

2009-11-14 Thread Parag Kalra
Hmmm. Even I am a beginer but let me throw some pointers. Experienced users kindly correct me if I am wrong First line is declaring a constant. What I could not get is that what constant are we trying to declare i.e a variable, hash or a reference. Read more - perldoc constant And then t

return {}->{'name'};

2009-11-14 Thread Ming Qian
Hello, I encounter some code as follows, and can not understand. Would someone help me? use constant 'cache_result' => {}; sub abc { ... return cache_result->{$self->name}; } What does this mean? Best, Bruce

Re: redirecting to a file in perl

2009-11-14 Thread Jim Gibson
At 5:38 PM +0530 11/13/09, Subhashini wrote: #!/usr/bin/perl use strict; print "ENTER THE WORD IN ENGLISH"; print "\n"; $english=; print "word ="; print "$english"; print "\n"; print "*** FRENCH -TO - ENGLISH - TRANSLATION*

Re: redirecting to a file in perl

2009-11-14 Thread Subhashini
#!/usr/bin/perl use strict; print "ENTER THE WORD IN ENGLISH"; print "\n"; $english=; print "word ="; print "$english"; print "\n"; print "*** FRENCH -TO - ENGLISH - TRANSLATION"; system ("dict -d fd-eng-fra $