File operations in perl

2010-08-08 Thread Chandan Kumar
Hi all,   I would like to know any available web links  for learning file operations .which helps from basic and to little deeper.   Seached in google ,but i didnt get required info.         Regards, chandan.

usage of Split

2010-07-28 Thread Chandan Kumar
Hi ,   using split ,I would like to split on space character. Dont want to use character classes. my $string=108 ambulance 100\nfireengine141jack;   my @array = split /' '/,$string;    foreach my $value (@array){ print $value \n; }   Result : its splitting on new line character.instead of space

Re: Word boundaries

2010-07-21 Thread Chandan Kumar
:06 PM, John W. Krahn jwkr...@shaw.ca scribbled: Rob Dixon wrote: On 20/07/2010 16:22, Chandan Kumar wrote: Small confusion about word boundaries. word boundaries matches anything between non-word character and word character ,right. Not quite. Quite. /\b/ matches any (zero-length

Word boundaries

2010-07-20 Thread Chandan Kumar
Hi ,   Small confusion about word boundaries. word boundaries matches anything between non-word character and word character ,right.   Here is small example : $_ = ?Jack do you know the beauty of perl print Enter your text:; my $pattern = STDIN; chomp $pattern; if (/$pattern/){ print 1.$1\n; }  

usage of Split on pattern matching

2010-07-19 Thread Chandan Kumar
Hi all,   Iam beginner to perl i have a small query on split. using split i want print everything even the character used to split on string.   Here is my example :   my $string = hi123now456itstimeforsplit789right my @array  = split ( '/(\d+\s)/ ',$string); ## Trying to split using digitnumber

Re: usage of Split on pattern matching

2010-07-19 Thread Chandan Kumar
Thanks guys, I could able to understand split fun. --- On Mon, 19/7/10, John W. Krahn jwkr...@shaw.ca wrote: From: John W. Krahn jwkr...@shaw.ca Subject: Re: usage of Split on pattern matching To: Perl Beginners beginners@perl.org Date: Monday, 19 July, 2010, 4:29 PM Chandan Kumar wrote: Hi

Query on Qunatifiers

2010-07-15 Thread Chandan Kumar
Hi ,   I have query over quantifiers.   Could you please explain the combination of operators Question mark (?),dot(.),star(*),plus(+).   Say this is my string:   $_ =  this is my first pattern ,quite confused with quantifiers    ex: (thi.*?) or (thi.+?) etc   I know what each operator does

Re: AW: Query on Qunatifiers

2010-07-15 Thread Chandan Kumar
Perl beginners@perl.org Cc: Chandan Kumar chandan_28...@yahoo.com Date: Thursday, 15 July, 2010, 7:22 AM Chandan Kumar chandan_28...@yahoo.com asked: I have query over quantifiers. Could you please explain the combination of operators Question mark (?),dot(.),star(*),plus(+). Say

Re: Query on Qunatifiers

2010-07-15 Thread Chandan Kumar
in advance.     Best Regards, chandan. --- On Thu, 15/7/10, Chas. Owens chas.ow...@gmail.com wrote: From: Chas. Owens chas.ow...@gmail.com Subject: Re: Query on Qunatifiers To: Thomas Bätzler t.baetz...@bringe.com Cc: Beginners Perl beginners@perl.org, Chandan Kumar chandan_28...@yahoo.com Date