one small question

2006-07-26 Thread anand kumar
Hi all, Can any one say a command or procedure to find out on which OS/Platform does our current perl script is running. Thanks in advance for the help Reards Anand Kumar - Here’s a new way to find what you&#x

doubt in quote-like operators

2006-08-06 Thread anand kumar
these functions. Thanks in advance for the help Regards Anand Kumar - Here’s a new way to find what you're looking for - Yahoo! Answers

Re: doubt in quote-like operators

2006-08-07 Thread anand kumar
Hi, Thanks alot for the detailed explanation. Regards Anand Kumar Prabu <[EMAIL PROTECTED]> wrote: anand kumar wrote: > hi all, > > I could not understand clearly the functions > qw(),qq(),qr(),qx(),q(),quotemeta(). I > have read the explanation for these

Connecting to Oracle

2006-08-22 Thread anand kumar
the DBD::Oracle module from cpan.org but i could not install the module because the oracle drivers are accessible to Perl on the Linux server. In this regard please suggest any solution or any documentation Regards Anand Kumar

Regading 'perlipc'

2007-06-14 Thread anand kumar
Hi all, I would like to know if there is any possibilty to handle a situation where in while executing a perl script if i press a Control-C (or terminate the execution explicitly) then my code should be in a position to handle it and display a predefined message(or specifically execute predefi

Set time period for a statement to execute

2007-06-20 Thread anand kumar
Please guide me with some code or documentation for the following problem :- I need to set some specific time for a command to execute. For example, If I am opening a very large file and it takes me more than 3 to 4 seconds then my code should be able to quit the program or kill the process

Re: Set time period for a statement to execute

2007-06-20 Thread anand kumar
Thank You It worked fine -Anand "Mumia W." <[EMAIL PROTECTED]> wrote: On 06/20/2007 02:07 AM, anand kumar wrote: > Please guide me with some code or documentation for the following problem :- > > I need to set some specific time for a command to execute. [...]

Doubt

2005-12-11 Thread anand kumar
Hi I am new to perl .i have a doubt in analysing the following regex. (my $book = $ref_string) =~ s/\s*(\d+(?::\d+(?:-\d+(?::\d+)?)?)?)\Z//; here i want to know the meaning of '?:' thanks in advance Anand - Yahoo! Indi

Doubt

2005-12-11 Thread anand kumar
Hi I am new to perl .i have a doubt in analysing the following regex. (my $book = $ref_string) =~ s/\s*(\d+(?::\d+(?:-\d+(?::\d+)?)?)?)\Z//; here i want to know the meaning of '?:' thanks in advance Anand - Yahoo! Indi

manipulating each string in a file

2005-12-13 Thread anand kumar
Hi All, I have a task i.e , I have to read each string from a file check wheather it is in the list(predifned array) or not, if found i have to make some changes to the string and rewrite back to file. here on exception is that in some cases : for eg: if the stri

syntax of a perl program?

2005-12-20 Thread anand kumar
Hi all Can anyone let me know some functions or some tutorial on how to check the syntax of a perl program. Thanks in advance Anand Send instant messages to your online friends http://in.messenger.yahoo.com

Reading contents of file

2006-01-08 Thread anand kumar
Hi I am new to PERL. I have a doubt, The following script is used to read the contents of a file (word by word (or) word preceeded by a number), check for the existence of the matched pattern which is done by the help of bookref() sub, if it is found then the matched pattern is prefixed

RE: Reading contents of file

2006-01-08 Thread anand kumar
line "print OUT $line;" should be in the while loop, not outside. See this: while ( $line = { if ($line=~m/([123]?[\.\s]*[a-z\\=\.]+)/oi) { .. ... do what u want if regex matches ... print OUT $line; } } Dhanashri -Original Message- From: anand kumar [mailto:[EMAIL PROTECTED] Sent

RE: Reading contents of file

2006-01-09 Thread anand kumar
once all matches on the line are found. Well I’m not a Perl expert, so this is what I could think of J But I’m sure there must be a better way to do it! Dhanashri - From: anand kumar [mailto:[EMAIL PROTECTED] Sent: Monday

Duplicates elements in an array

2006-02-05 Thread anand kumar
Hi all I have an array with hundreads of elements in it. Can anyone suggest the easiest way to keep only the duplicate elements in the array. Thanks in Advance for the help Regards Anand - Jiyo cricke

regex problem

2006-02-14 Thread anand kumar
Hi all, I have the following problem in the following regex replace. $line=~s!\b($name)\b!$1!g; here this regex finds the exact matching of the content in $name and does the needed but in some examples the variable $name may contain backslash characters like 'gene\l=s\' , in t

Re: regex problem

2006-02-15 Thread anand kumar
"John W. Krahn" <[EMAIL PROTECTED]> wrote:anand kumar wrote: > Hi all, Hello, > I have the following problem in the following regex replace. > > $line=~s!\b($name)\b!$1!g; > > here this regex finds the exact matching of the content in $name and does >

hash array

2006-02-15 Thread anand kumar
Hi all while learning hash arrays i have got a doubt i.e if the data is in the following manner Name ABC AGE 25 Book perl Name DEF AGE 20 Book linux Name GHI AGE 21 Book PHP . .. (assume that the above dat

Re: hash array

2006-02-15 Thread anand kumar
Hi , Thanks for the reply. but can u help me out if the data is large and need a loop to store(also if possible give instructions if the record has variable or optional number of fields). Jeff Pang <[EMAIL PROTECTED]> wrote: Name ABC AGE 25 Book perl Name DEF AGE 20 Book linux Name GHI

Re: hash array

2006-02-15 Thread anand kumar
; my $age = $1 if ($_ = <>) =~ /AGE\s+(.*)$/; my $book = $1 if ($_ = <>) =~ /Book\s+(.*)$/; $hash{$name}->{age} = $age; $hash{$name}->{book} = $book; } } # then print the value -----Original Message- From: anand kumar Sent: Feb 15, 2006 10:33 PM To: beginners@perl.org Su

Combine similar patterns

2006-03-28 Thread anand kumar
Hi all, I have a problem in combining the nested/multiple patterns. The input of the file is as follows: Input:- A B C D E F G H I J K L M N O and i would like to convert in to the followi

Re: Combine similar patterns

2006-03-29 Thread anand kumar
Hi all   Sorry for not posting the question clearly, Please find the attachment of the sample file. The matter enclosed in …., …..….…… are all the foot notes that are spanning on various pages, now what I am trying to do is that to combine all the related footnotes that are spanned in various pag

Re: Combine similar patterns

2006-03-29 Thread anand kumar
ones. Please help in this matter Thanks in advance for the help Regards Anand Xavier Noria <[EMAIL PROTECTED]> wrote: On Mar 29, 2006, at 10:28, anand kumar wrote: > Sorry for not posting the question clearly, Please find the > attachment of the sample file. The matter

Re: [SPAM DETECT] Re: Combine similar patterns

2006-03-29 Thread anand kumar
Hi   Please find the file as an attachment with this mail   Regards AnandXavier Noria <[EMAIL PROTECTED]> wrote: On Mar 29, 2006, at 12:01, anand kumar wrote:> Yes, of course the code u have sent is very helpful and thanks for > that. But the problem here is that in a single fi

Re: Combine similar patterns

2006-03-29 Thread anand kumar
Hi Please find the attached input.dat and output.dat Thanks in advance for the help Regards Anand Xavier Noria <[EMAIL PROTECTED]> wrote: On Mar 29, 2006, at 12:32, anand kumar wrote: > Please find the file as an attachment with this mail Well, that didn'

Re: Combine similar patterns

2006-03-29 Thread anand kumar
Hi   Please find the attached input.dat and output.dat   Thanks in advance for the help   Regards AnandXavier Noria <[EMAIL PROTECTED]> wrote: On Mar 29, 2006, at 12:32, anand kumar wrote:> Please find the file as an attachment with this mailWell, that didn't look like a sim

Re: Learning Perl

2006-04-11 Thread anand kumar
HI Try this #!/bin/perl use strict; use diagnostics; print "\t Enter Month of a year \n"; my $month = (); chomp($month); my %days_month = ( January => 31, February => 28, March => 31 ); print "\t Number of Days in month of $month is $days_month{$month} \n "; Regards Anand j