deep and shallow binding

2005-02-17 Thread Ajey Kulkarni
Hi, Can any one explain me how perl treats this binding? - also i'm little confused about the binding rules for reference environments. Unless we use strict, i guess, the default scope is global - is this right? Any pointers,links will be highly appreciated regards -Ajey -- To unsubscribe, e

Re: Regex help

2005-01-16 Thread Ajey Kulkarni
Huh.. Thanks a ton. I never expected a program. :-)). regards -Ajey On Sun, 16 Jan 2005, Dave Gray wrote: On Sat, 15 Jan 2005 01:25:21 -0800 (PST), Ajey Kulkarni <[EMAIL PROTECTED]> wrote: I'm trying to match a floating point in ada. They are normal floating points with 2 extra things.(

Regex help

2005-01-15 Thread Ajey Kulkarni
Hi, I'm trying to match a floating point in ada. They are normal floating points with 2 extra things.(they can or can't come) 1. an underscore is permitted between the digits and 2. An alternate numeric base may be specified surrounding the nonexponent part of the number with pound signs, precide

RE: How to monitor a scritp

2004-11-23 Thread Ajey Kulkarni
also,often its easy to forget cron.allow and cron.deny files being updated. Make sure u've right access & crontab -e (for user specific) may also help to test ur script locally. May be you should check with the cron/crontab tweakins than Perl list. :) On Tue, 23 Nov 2004, Larsen, Errin M HMMA/IT

perl module - Statistical mean and sd

2004-11-18 Thread Ajey Kulkarni
Hello all, does any1 know the perl module for the same? Also, i want to submit a couple of modules to cpan library. Whats the process to do this? regards ~A. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regexp for ip address

2004-11-11 Thread Ajey Kulkarni
I would love to see the 'HUGE' regex being re-coded using rule based perl 6.0 on Parrot ;-)). The 6.0 regex engine looks like the one of YACC (grammar) based to me. Just a sidenote ~A On Fri, 12 Nov 2004, Ing. Branislav Gerzo wrote: > Gunnar Hjalmarsson [GH], on Friday, November 12, 2004 at 00

RE: Why doesn't this work?

2004-11-09 Thread Ajey Kulkarni
If you are running this on *NIX box, plain old 'find' command is enough too. ~A On Tue, 9 Nov 2004, Jim wrote: > > > The following subroutine should take an input path (Dir0), > > process that directory by recursively calling itself on > > subdirectories or processing any files it contains. T

Re: How to get text after comment

2004-11-08 Thread Ajey Kulkarni
On Mon, 8 Nov 2004, Randy W. Sims wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > I need to capture whole text after "#" character in each line from a > > file.The below script is not working can any one suggest the correct > > thing plz.. > > Your regexp: > > > if ($line1 =~ /^#\(.*\)/)

Re: how to pass array and varaible

2004-11-08 Thread Ajey Kulkarni
John and Gunnar, Thanks a ton for clarification. ~A On Sun, 7 Nov 2004, John W. Krahn wrote: > Gunnar Hjalmarsson wrote: > > > > Ajey Kulkarni wrote: > >> > >> Alright, but what is the reason for less time when you pass the ref? > >> I always thought

RE: how to pass array and varaible

2004-11-07 Thread Ajey Kulkarni
Alright, but what is the reason for less time when you pass the ref? I always thought the perl optimizes by sending the ref even if you use a direct array. Where can i find more detailed info? regards ~A On Sun, 7 Nov 2004, Charles K. Clarkson wrote: > Ajey Kulkarni <[EMAIL PROTECTED]&

Re: how to pass array and varaible

2004-11-06 Thread Ajey Kulkarni
> The varaible number is been appended to the arrya, I want as exactly > passed Hmmm...Whenever you pass array AND a variable with array being first, the subroutine takes the variable and appends to array. Your signature MUST BE sub change { my ($var,@arr) = @_; blah blah } Make sure

Re: Windows - Unix communication using perl

2004-11-01 Thread Ajey Kulkarni
i feel net::rexec module should help me out. Thanks. ~A On Mon, 1 Nov 2004, Chasecreek Systemhouse wrote: > On Mon, 1 Nov 2004 14:00:37 -0800 (PST), Ajey Kulkarni <[EMAIL PROTECTED]> wrote: > > I would like to do something like rexec/rsh from a windows (client) > > to Unix

Windows - Unix communication using perl

2004-11-01 Thread Ajey Kulkarni
be running. Here i would like to start a process on the server triggered by Windows-client. Any pointers will be of great help Thanks a ton Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn

Re: Multi Line text processing

2004-11-01 Thread Ajey Kulkarni
>> my $txt = do { local $/; }; Just on a side note, has any1 tried to get the MAX FILE SIZE that can be slurped into a scalar variable? Is there any limit? Where can i get such info?? Regards ~A On Mon, 1 Nov 2004, Gunnar Hjalmarsson wrote: > Anish Kumar K. wrote: > > I want to replace a text

Re: each character in a string

2004-10-29 Thread Ajey Kulkarni
> I have initialised $_ with the string in which I have to search. Now I > > know that the while loop will read each and every character in the > > string. I just need to get that character read to make the comparison. I > > know $1 doesnt work because it is not :) Wher

Re: each character in a string

2004-10-29 Thread Ajey Kulkarni
It will... #!/usr/bin/perl my $var = "-- hellohowareyou-"; $_ = $var; while (/(.)/g) { # . is never a newline here # do something with $1 if($1 eq '-') { printf "HELLO"; } else { printf "HI"; } } On Fri, 29 Oct 2004

RE: Append on top

2004-10-29 Thread Ajey Kulkarni
>>> while (read OLDFILE, $buff, 8*1024); A quick qn. :) Y is 8*1024 being mentioned here? Are you just word-aligning or something else? regards -Ajey On Fri, 29 Oct 2004, Jenda Krynicky wrote: > From: [EMAIL PROTECTED] > > This is the way I would do it, h

Re: File read qn

2004-10-22 Thread Ajey Kulkarni
David,Thanks much. I'll give it a shot and comeup with the code. This is a new learning to me today :) regards -Ajey On Sat, 23 Oct 2004, David le Blanc wrote: > On Fri, 22 Oct 2004 20:13:05 -0700 (PDT), Ajey Kulkarni <[EMAIL PROTECTED]> wrote: > > howdy!! > > I'v

File read qn

2004-10-22 Thread Ajey Kulkarni
using @lines) in an array. I can do this by parsing the @lines again ,split() and get each array element,but this may be slow. Is there better way to achive this?? Thanks a ton, Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.

Re: Reg ex : tabs/spaces

2004-10-17 Thread Ajey Kulkarni
One more extension to this qn. #snippet to replace all the ,, with ,NEW, my($word) = " Detail Design Activity Included ,-1,0 ,hello,ajey "; $word =~ s/\s+//g; $word =~ s/,,/,NEW,/gc; printf "word=$word#\n"; after removing the blanks ,if there

Re: Reg ex : tabs/spaces

2004-10-17 Thread Ajey Kulkarni
Thanks a ton Gunnar, How about the intermediate blanks? Is there a way to recursively take all blanks/tabs that occur?? word=Detail Design Activity Included# I would like to remove the blanks here.. TIA -Ajey On Sun, 17 Oct 2004, Gunnar Hjalmarsson wrote: > Ajey Kulkarni wrote: > >

Reg ex : tabs/spaces

2004-10-17 Thread Ajey Kulkarni
27;m stil not able to get the trailing blanks. After i'm done with this,. how can i remove the intermediate blanks which occur?? Is it best to store in a array and then join??? regards -ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

File parsing

2004-10-14 Thread Ajey Kulkarni
d/Control 0 0 0 Say the line above is separated by commas,and i would like to parse the same. I'm doing this using split(). Now that depending on the user input, i want to search/replace or simply delete the field (or column). What is the best way to this. (Fastest??).

Re: could not find ParserDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX; also need some advice about XML parsing modules on CPAN

2004-10-11 Thread ajey
ANother observation is that i'm not finding any problem with this warning/err message. There are no side-effects. The XML:: parser is working correctly. regards -Ajey Quoting Ken Wolcott <[EMAIL PROTECTED]>: > Ken Wolcott wrote: > > > I suppose it is in bad taste to rep

Re: XMLin() not finding XML::SAX or XML::Parser modules Problem

2004-09-24 Thread Ajey Kulkarni
I installed the expat libs,but the cpan shell is now asking for EXPATLIBPATH and EXPATINCPATH. It says perl Makefile.PL Now,how do i specify these paths for XML::Module installation?? Where is this Makefile.PL file? Regards again -Ajey On Thu, 23 Sep 2004, Chris Devers wrote: > Ple

Re: How do I get rid of ""

2004-09-24 Thread Ajey Kulkarni
if you open the file in vi,say :%s/ctrl-v & ctrl-p//g You can check $line =~ s/ctrl-v ctrl-p//g; Mainly ^ = ctrl-v P = ctrl-p regards -Ajey On Thu, 23 Sep 2004, William Martell wrote: > Hi All, > > This "" is in a text file that I am working with. I a

XMLin() not finding XML::SAX or XML::Parser modules Problem

2004-09-23 Thread Ajey Kulkarni
here? Any pointers? Thanks a ton -Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Perl modules path related

2004-09-09 Thread Ajey Kulkarni
hi, I've a perl script which uses a perl module located in /tools/tools/perl/lib. If i want to change this path to say /tmp/perlNew/lib and make the script to fetch the new /tmp/perlNew/lib path. How can i do this?? TIA -Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: String concatenation qn

2004-01-25 Thread Ajey Kulkarni
Thanks a ton to all. On Sat, 24 Jan 2004, drieux wrote: > > On Jan 23, 2004, at 5:24 PM, wolf blaum wrote: > > > For Quality purpouses, Ajey Kulkarni 's mail on Saturday 24 January > > 2004 17:52 > > may have been monitored or recorded as: > > > >&g

String concatenation qn

2004-01-23 Thread Ajey Kulkarni
rr"; where $filename has /tmp/xyz Anything really silly here?? regards -Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

qn about the reg expression.

2004-01-09 Thread Ajey Kulkarni
hi , whenever 1 matches something in regular expression,where the 'MATCHED EXPRESSION' be stored? will this be stored in $_ variable where can i find more info about this?? tia -Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

RE: hi..

2004-01-02 Thread Ajey Kulkarni
thanks Charles.I will give the ryt subject next time. On Fri, 2 Jan 2004, Charles K. Clarkson wrote: > Ajey Kulkarni <[EMAIL PROTECTED]> wrote: > > : Subject: hi.. > > > Great subject. So much better than "Need help with regex" > or "N

hi..

2004-01-02 Thread Ajey Kulkarni
e stuff,but i just checkign out a 1 liner reg-ex. regards -ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Running command from string variable as if part of script

2003-12-22 Thread Ajey
my @lines = `cat <2nd_script>`; for each my $line (@lines) { do something; } I guess this should work.I'm presuming that,"normal perl commands' means, each perl stmt in the script. correct me incaes i'm wrong. On Mon, 22 Dec 2003, Tushar Gokhale wrote: > I'm reading another perl script

Re: how to remove a ^M charaters from a variable

2003-12-19 Thread Ajey
if its a unix file,.open in vi :%s/ctrl+v ctrl+m//g (where ctrl+v and ctrl+m gives the ^M character.) cheers On Fri, 19 Dec 2003, Douglas Lentz wrote: > David Inglis wrote: > > >I am reading in a csv file and it has a control character ^M at the end > >of each line how can I remove these char

silly qn,.

2003-12-17 Thread Ajey
hi, how can i find which perl modules are installed on linux os? regds -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: a doubt

2003-12-15 Thread Ajey
Too good. thanks John. On Mon, 15 Dec 2003, John W. Krahn wrote: > Ajey wrote: > > > > Hi, > > Hello, > > > How can i catch the difference in 2 files on a perl stmt? > > I want to do somethign like, > > if (there is some diff in 2 files) > > d

a doubt

2003-12-15 Thread Ajey
Hi, How can i catch the difference in 2 files on a perl stmt? I want to do somethign like, if (there is some diff in 2 files) do something1 else do something2 Both files are simple text files TIA -Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

some doubt

2003-12-12 Thread Ajey Kulkarni
hi, How can i rename a file and check the size of file using perl? Also is there a way to call unix commands/system calls from perl?(Say i want to fstat() on a file and grab the stat struct results). Is there any way?? TIA -Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

2nd doubt.

2003-12-10 Thread Ajey Kulkarni
HI again. I'm tryign to modify the .procmailrc file Initially the file looks liek this -- :0: * ^X-Spam-Status: Yes | dmail +mail/junk :0: * ^X-Spam-Status: Yes | dmail +mail/junk :0: * ^X-Spam-Status: Yes | dmail +mail/junk :0: * ^X-Spam-Status: Yes | dmail +mail/junk :0: *

1 doubt.

2003-12-10 Thread Ajey Kulkarni
gs" line? Quick reply is highly appreciated regards -Ajey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>