RE: process signals

2004-05-07 Thread Jayakumar Rajagopal
Bottom posted: On Friday 07 May 2004 11:00 am, [EMAIL PROTECTED] wrote: > yeah ok whatever I want to use perl not ksh...as simple as that. > > Derek B. Smith > OhioHealth IT > UNIX / TSM / EDM Teams > > > > > > > "Jayakumar Rajagopal&q

RE: process signals

2004-05-07 Thread Jayakumar Rajagopal
Mr Smith, I saw your elementary question at about 8:50 AM. I did not answer it, since it was not clear to me too. I have seen Bob ( who I have never spoken with or by no means friend of me) answering good, difficult questions very legibly. If you think you have know better unix, then you

RE: command line script to run from web

2004-04-23 Thread Jayakumar Rajagopal
-Original Message- From: Graeme McLaren [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:13 AM To: [EMAIL PROTECTED] Subject: command line script to run from web Afternoon all, I have a script that runs from the command line but now I need it to from from the web, anyone know

RE: backtick variable substitution

2004-04-22 Thread Jayakumar Rajagopal
-Original Message- From: hdan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 2:14 PM To: Jayakumar Rajagopal Cc: hdan; [EMAIL PROTECTED] Subject: Re: backtick variable substitution Yes, it works at a ksh prompt: harold$ cat -n app_system.log.7 | grep -E 'period'

RE: backtick variable substitution

2004-04-22 Thread Jayakumar Rajagopal
Harold, (bottom posted) -Original Message- From: hdan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 1:54 PM To: Jayakumar Rajagopal Cc: hdan; [EMAIL PROTECTED] Subject: Re: backtick variable substitution Thanks. I've tried that, but it didn't work. I've a

RE: backtick variable substitution

2004-04-22 Thread Jayakumar Rajagopal
Hi hdan, try \$ for $. I did not test it anyway. HTH, Jay -Original Message- From: hdan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 1:13 PM To: [EMAIL PROTECTED] Subject: backtick variable substitution Hi all, Hopefully someone can help me out with this one. I have a perl

RE: why $a became 6 ?

2004-04-15 Thread Jayakumar Rajagopal
Thank you Steve,William,Ricardo. Excellent answers. regards, Jay -Original Message- From: Steve Grazzini [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 2:43 PM To: Jayakumar Rajagopal Cc: [EMAIL PROTECTED] Subject: Re: why $a became 6 ? Jayakumar Rajagopal wrote: > ($

why $a became 6 ?

2004-04-15 Thread Jayakumar Rajagopal
$a=100; $b=200; ($a=3 && $b=6 ) if ( 1 == 1 ); print " $a $b \n"; Output : 6 6 OR my syntax is wrong ? regards, Jay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: guessing script

2004-04-15 Thread Jayakumar Rajagopal
(my $guess = ); 'my' is your problem.. that creates new varialbe remove it.. HTH Jay -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 11:41 AM To: [EMAIL PROTECTED] Subject: guessing script Learning Perl here.. So I wrote this number guessin

RE: how to define ths variable

2004-04-14 Thread Jayakumar Rajagopal
-Original Message- From: Romain Groleau [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 6:49 PM To: [EMAIL PROTECTED] Subject: how to define ths variable Hi, Me again, I'd like to define a variable like $rslotnXnY where X and Y are alos variable, I tried like this but it doesn

RE: "\s" eq "\b" ?

2004-04-14 Thread Jayakumar Rajagopal
Thank you Steve,David,Jenda. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: "\s" eq "\b" ?

2004-04-14 Thread Jayakumar Rajagopal
-Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 2:25 PM To: Beginners Perl Subject: Re: "\s" eq "\b" ? From: "Jayakumar Rajagopal" <[EMAIL PROTECTED]> > hi friends, > in regexp, I feel \s an

RE: "\s" eq "\b" ?

2004-04-14 Thread Jayakumar Rajagopal
hi friends, in regexp, I feel \s and \b behaves same. can someone send me a contradiction ? thanks, Jay -End Orig Message- In the string 'This is a sentance.' /ce\b/ matches /ce\s/ does not match The more information you can give about the context of your question, the better your r

"\s" eq "\b" ?

2004-04-14 Thread Jayakumar Rajagopal
hi friends, in regexp, I feel \s and \b behaves same. can someone send me a contradiction ? thanks, Jay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

\b in regexp..

2004-04-14 Thread Jayakumar Rajagopal
friends, script : $_='as great as perl'; print $& ."\n" if (/\beat/); print $& ."\n" if (/\bgre/); output : gre *** Why 'boundary' assertion does not match in end of word , but only the start of word? thanks, Jay -- To unsubscribe, e-mail: [EMAIL PRO

RE: s/// w/o RE

2004-04-14 Thread Jayakumar Rajagopal
-Original Message- From: Bryan Harris [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 3:07 AM To: Beginners Perl Subject: s/// w/o RE A quick question for the wizards-- Is it possible to do a substitution without compiling the pattern at all? **

RE: New to perl ...

2004-04-13 Thread Jayakumar Rajagopal
Hello, I am not sure, why you want to 'do Nothing' about the contents of the file. if you change gif to jpg, it will conflict the formats. Try this for just changing names: $a='1.x.jpg'; # first file.. $b='3.gif'; # second file.. if ( "$a:$b" =~ /(.*)\.([^\.]+):(.*)\.([^\.]+)/) {

RE: try to get the value of the fields

2004-04-12 Thread Jayakumar Rajagopal
-Original Message- From: deny [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 12:45 PM To: [EMAIL PROTECTED] Subject: try to get the value of the fields hello i use this command to get the values the fields of my form while (($nom, $valeur) = each(%champs)) {

RE: installing perl module without root permission

2004-04-12 Thread Jayakumar Rajagopal
/where/you/want/it > > ___ > > if those lines dont answer the question check the rest of that document, > it is very good at explaining it. > > > Jayakumar Rajagopal wrote: > > > Hi friends, > > I am in this condition : > > (

RE: installing perl module without root permission

2004-04-08 Thread Jayakumar Rajagopal
Install.pm line 114 bottom posted full details: -Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 2:58 PM To: Jayakumar Rajagopal; Perl Beginners Subject: Re: installing perl module without root permission > Hi friends, >

RE: Help with Variable Scope, Regular Expressions

2004-04-08 Thread Jayakumar Rajagopal
n - indicates you are sorting on the field [ that comes after ] 'n' th "," -- sorry for typo. -Original Message----- From: Jayakumar Rajagopal Sent: Thursday, April 08, 2004 2:31 PM To: William Martell; [EMAIL PROTECTED] Subject: RE: Help

RE: Help with Variable Scope, Regular Expressions

2004-04-08 Thread Jayakumar Rajagopal
Willam, You use in your code : my @alllines; while ( ) { my $line; all your while loop code.. push @allines, $line; } @alllines = sort @alllines; Within while loop, replace every ' print "..";' with '$line .= sprintf ".. "

RE: inserting a string in between two other strings

2004-04-08 Thread Jayakumar Rajagopal
DBSmith, "Need not cross pacific ocean, when you want to go from NY to CA" :) this too works : awk '{ print $1 " mb "$2}' /tmp/filename But use Perl; program fulfillment (Jay behalf of John :) ) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, Ap

installing perl module without root permission

2004-04-08 Thread Jayakumar Rajagopal
Hi friends, I am in this condition : (1) I have to install XML::Simple or XML::Twig or such XML module. (2) Here Sys. administrator, does not install/ or allow me to install (1). When I try to use within my user, it says 'no permission' for wrting. (

RE: Matching pattern in multiple lines

2004-04-07 Thread Jayakumar Rajagopal
-Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of prabu Sent: Wednesday, April 07, 2004 9:35 AM To: [EMAIL PROTECTED] Subject: Matching pattern in multiple lines Hello All, Thanks for the useful informations given on my previous queries.Now I have another one query. P

RE: New to Perl

2004-04-06 Thread Jayakumar Rajagopal
-Original Message- From: david [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 3:55 PM To: [EMAIL PROTECTED] Subject: Re: New to Perl Wc -Sx- Jones wrote: you said: > UNDEF will be 'treated' as FALSE; Larry had to have some sanity > somewhere... clearly stating that undef is fa

RE: help in find and replacing a string in a number of files

2004-04-02 Thread Jayakumar Rajagopal
-Original Message- From: senthil prabu [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 12:55 AM To: Charles K. Clarkson; [EMAIL PROTECTED] Subject: RE: help in find and replacing a string in a number of files Hi, I want to open all (.txt,.html,.js files) files in a particular di

RE: Check if another script running

2004-04-02 Thread Jayakumar Rajagopal
-Original Message- From: Mike Blezien [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 3:16 PM To: Perl List Subject: Check if another script running Hello, I need to setup a cronjob to run a script every 2hrs, but if another particular script(executed via a standard web form),

RE: Strings with extended characters

2004-04-01 Thread Jayakumar Rajagopal
Jim Please send two sample strings one that contains 'reject'able stuff, and other with those 88. That would clarify us better. Jay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 9:58 AM To: [EMAIL PROTECTED] Subject: Strings with extend

RE: Check if another script running

2004-04-01 Thread Jayakumar Rajagopal
sorry.. I missed one thing.. This is the right condition line: ps -ef | grep $0 | grep -v $$ | grep -v grep | grep $0 -Original Message- From: Jayakumar Rajagopal Sent: Thursday, April 01, 2004 5:30 PM To: [EMAIL PROTECTED]; Perl List Subject: RE: Check if another script running I

RE: Check if another script running

2004-04-01 Thread Jayakumar Rajagopal
I think your question is more related to unix than perl. Try something like this in shell script : program=$0 while ps -ef | grep $0 | grep -v grep | grep $$ do sleep 10 done or in perl $program=$0; while ( `ps -ef | grep $0 | grep -v grep | grep $$` ) { sleep 10 ; } ** I d

RE: split

2004-03-31 Thread Jayakumar Rajagopal
it will be undefined. kind of null. and defined( $options) -- will result in false. If you use it in expressions, you will get "". -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 5:37 PM To: [EMAIL PROTECTED] Subject: split Hey if I

RE: why warn 'prints'?

2004-03-26 Thread Jayakumar Rajagopal
James, Yes. you are right. But my Q was, why such behaviour ? What is the idea behind such implementaiton? thanks, Jay -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 12:07 PM To: Jayakumar Rajagopal Cc: beginners Beginners Subject

why warn 'prints'?

2004-03-26 Thread Jayakumar Rajagopal
Warn behaves like print, unless I add a space afer "\n". why ? $ perl warn " Not able to create portfolio_list \n"; #no space after \n __END__; Not able to create portfolio_list $ perl warn " Not able to create portfolio_list \n "; __END__; Not able to

warn ?!

2004-03-25 Thread Jayakumar Rajagopal
Hi, In my program , $sth->execute fails since oracle tables already present. It is very natural. But the waring message output line 37 is different(just behaves as print) from same kind of message at line 57. Any suggestions please.. regards, Jay regression Testing table( default : reg_tes

RE: $dbh->do('\@proc')

2004-03-24 Thread Jayakumar Rajagopal
Thanks Joseph. I will try opening .sql file, and iterate through every stmt. in it. regards, Jay -Original Message- From: R. Joseph Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 2:25 AM To: Jayakumar Rajagopal Cc: [EMAIL PROTECTED] Subject: Re: $dbh->do(

RE: $dbh->do('\@proc')

2004-03-23 Thread Jayakumar Rajagopal
Bob, Thanks. Your guess is right. okay, I would run stmt by stmt. thanks, Jay -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 10:55 AM To: Jayakumar Rajagopal; [EMAIL PROTECTED] Subject: RE: $dbh->do('[EMAIL PROTECTED]'

$dbh->do('\@proc')

2004-03-23 Thread Jayakumar Rajagopal
Hi all, I have to use PERL to run ".sql" files ( for eg. runstmts.sql), which I do this way in SQL prompt : SQL> @runstmts I tried using $dbh->('[EMAIL PROTECTED]') and $dbh->('start runstmts.sql')... but says 'invalid SQL stmt'. please help. thanks, JAy --

RE: sort stdin and print

2004-03-18 Thread Jayakumar Rajagopal
#!/usr/bin/perl use strict; my $count = 0; my %line ={};# - create a uniq line hash while( <> ) { #read from stdin one line or record at a time s/ipadd://; #if line has ipadd: remove it s/^ |\t//;

RE: basic syntax s/..../..../

2004-03-18 Thread Jayakumar Rajagopal
Dave, Try this : my @files = <>; @files = sort @files; foreach(@files){ my $newname = $_; changed $newname =~ s/PIC1000/NEWNAME/; changed rename($_, "$newname"); } thanks, Jay -Original Message- From: David Gilden [mailto:[EMAIL PROTECTED]

RE: traps in perl

2004-03-17 Thread Jayakumar Rajagopal
eira [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 10:57 AM To: [EMAIL PROTECTED] Subject: Fw: traps in perl To Jayakumar Rajagopal: What did you say in these "print"? Please, translate the messages and the meaning of "$SIG": > > > > $SIG{INT} =

RE: traps in perl

2004-03-16 Thread Jayakumar Rajagopal
R1.. you can understand.. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 16, 2004 11:57 AM To: Jayakumar Rajagopal Cc: [EMAIL PROTECTED] Subject: RE: traps in perl thanks for the quick response! but could you give me an example of what syntax goes i

RE: traps in perl

2004-03-16 Thread Jayakumar Rajagopal
Try : $SIG{SIGTERM} = sub { ..something..} ; #-- in perl this is equivalent to trap '... something...' SIGTERM thanks, Jay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 16, 2004 10:29 AM To: [EMAIL PROTECTED] Subject: traps in perl All,

RE: Replace a string in a text file

2004-03-10 Thread Jayakumar Rajagopal
Use this from unix prompt : sed s/fox/coyote/g test.txt > tmp --Jay -Original Message- From: Mr Mojo [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 1:57 PM To: [EMAIL PROTECTED] Subject: Replace a string in a text file Hello, I have a text file (texst1.txt) that reads: The

RE: Nucleotide Sequence

2004-03-05 Thread Jayakumar Rajagopal
I think he asked something like this.. But I am not clear with his question.. #!/usr/bin/perl -w # change it to ur perl path use strict; my $seq = "ATGCCGCTGGTG"; # sequence my $hops = int(len($seq)/3); my %prob = ("ATT"=>0.1); # triplets to probabilities mapped my $sum = 0; while($k <= $hop

RE: Array of objects

2004-03-04 Thread Jayakumar Rajagopal
Bob, Your guess is perfect. Thanks a lot. All the problems happened due to misunderstanding of class behaviour. ( new() and get() functions). cheers, Jay -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 1:38 PM To: Jayakumar Rajagopal

RE: Array of objects

2004-03-04 Thread Jayakumar Rajagopal
, March 04, 2004 1:38 PM To: Jayakumar Rajagopal; [EMAIL PROTECTED] Subject: RE: Array of objects Jayakumar Rajagopal wrote: > Hi , > I have to store list of objects in Array. At the end, @arr contains n > copies of last $obj, but not every $obj created. I tried storing both > object, r

Array of objects

2004-03-04 Thread Jayakumar Rajagopal
Hi , I have to store list of objects in Array. At the end, @arr contains n copies of last $obj, but not every $obj created. I tried storing both object, ref of object. Array contains different references, but same data. Please help. thanks, Jay the current code looks like this : $n=0; my @arr=(