Re: Run 2 process in parallel.

2007-06-13 Thread Umesh T G
530, [EMAIL PROTECTED] ("Umesh T G") wrote: >Hola all, > >I have 2 perl scripts which has to run in parallel. > >I have run.pl which inturn has to call >1. pl and 2. pl; >I am not sure how I can do it using the Perl Threads. > >Can someone throw some light her

Run 2 process in parallel.

2007-06-13 Thread Umesh T G
Hola all, I have 2 perl scripts which has to run in parallel. I have run.pl which inturn has to call 1. pl and 2. pl; I am not sure how I can do it using the Perl Threads. Can someone throw some light here. I am not sure how I can achieve it. TIA, Cheers, Umesh

Grep a variable

2006-05-19 Thread Umesh T G
Hi List, I am trying to grep a variable from a scalar value. Here is the example below. $var = "mydisk"; $line = "mydisk is bad"; if (grep/\$var/,$line) { print "disk is not bad"; } This does not seems to work. Please help me out in figuring out this. TIA, Cheers, Umesh -- To unsubscrib

Re: Each char / letter --> array from string value

2005-12-28 Thread Umesh T G
On 12/28/05, Adriano Ferreira <[EMAIL PROTECTED]> The usual way to tear apart a string into an array with characters is @chars = split '', $string; It is documented at C. On 12/28/05, Chris Devers <[EMAIL PROTECTED]> wrote: > > $ perl -le '$i = "abcd"; @j = split //, $i; print join "\n", @j;'

Each char / letter --> array from string value

2005-12-28 Thread Umesh T G
Hi List, I need to put each letter from a string to an array. I am doing it this way and it works. I wanna know if there is any other better way to do this / a built-in function. #! /usr/bin/perl $srt ="123"; $sl = length $srt; $val= join (':', split(/ */, $srt) ); @arr = split(/:/,$val); for

copy using perl on windows

2005-12-16 Thread Umesh T G
I want to copy few files from a source directory to a destination directory my array contains all the source file names like this "..\..\..\AlgSource\ISA\C64x\asm\idct_8x8_c64xplus_h.asm" "..\..\..\AlgSource\ISA\C64x\asm\jpegdec_ti_vld_n_mcu.asm" "..\..\..\AlgSource\ISA\C64x\C\byte_unstuff.c"

Re: split regex

2005-12-15 Thread Umesh T G
Sorry for that John. It works fine. Many thanks for your help. Umesh On 12/16/05, Umesh T G <[EMAIL PROTECTED]> wrote: > > Thanks Very much John. :) it worked, but a small problem. if I have > "\" after the directory name, it does not take as new instanance. &

Re: split regex

2005-12-15 Thread Umesh T G
; -k* ** then, I'm getting output like this, dir1\dir2 dir3\dir4\dir5\dir6 This is because an extra "\" is present at the end of dir4. can you help again pls.? thanks so much. I want the output as dir1\dir2 dir3\dir4 dir5\dir6 Umesh On 12/15/05, John Doe <[EMAIL PRO

Re: split regex

2005-12-15 Thread Umesh T G
pls.? thanks Umesh ** ** ** On 12/15/05, John Doe <[EMAIL PROTECTED]> wrote: > > Umesh T G am Donnerstag, 15. Dezember 2005 14.20: > > Hi John, > > Hi Umesh > > > I tried like this, where $line='*Options=-a"hello" -mt -ml3 > -i"dir1\d

Re: split regex

2005-12-15 Thread Umesh T G
ceed after this. Thanks for your quick reply... Thanks Umesh On 12/15/05, John Doe <[EMAIL PROTECTED]> wrote: > > Umesh T G am Donnerstag, 15. Dezember 2005 13.00: > > Hi List, > > Hi Umesh > > > I want to get that value of *-i* set in below line. > > >

split regex

2005-12-15 Thread Umesh T G
Hi List, I want to get that value of *-i* set in below line. *Options=-a"hello" -mt -ml3 -i"dir1\dir2" -k -p -i"dir3\dir4" -m* What is the best way to get the value of *-i* values into one array. For ex: I want the output as: *dir1\dir2* and *dir3\dir4* into one array. Thanks in advance.

Re: STAT function; limit a log file.

2005-10-05 Thread Umesh T G
On 10/4/05, Jay Savage <[EMAIL PROTECTED]> wrote: > > > > > > > I want this file not to grow more than 50KB. > > > How can I go about it. I been stuck here.. this above script will not > do > > Thanks a lot for all that gyan. :) Cheers, Umesh

STAT function; limit a log file.

2005-10-04 Thread Umesh T G
Hello List, #!/usr/bin/perl close(STDERR); open(STDERR,">/tmp/test.log") or die " Can't do it!!"; for($i=0; $i <=30; $i++) { print STDERR "print something in the file.\n"; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat(STDERR); if ( $size eq '500' )

Javascript and perl

2005-09-27 Thread Umesh T G
Hello List, Below is my index.pl #!/usr/bin/perl use Env; print "Content-Type: text/html\n\n\n"; chdir("/path/to/dir"); @files=`ls -1`; ## load all the html files.. print "\n"; print "\n"; print < function submit_form() { document.show_fi

Re: Auto hashName generator;

2005-08-02 Thread Umesh T G
On 8/2/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > Umesh T G wrote: > > perldoc -q "How can I use a variable as a variable name" > Much Thanks... It is helpful. Cheers, Umesh. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

Auto hashName generator;

2005-08-02 Thread Umesh T G
Hello List, I am finding problem in generating a hash names. for eg. I have an array of elements. All elements should be converted into hash name and should get intialised. Say.. @Arr = qw ('one', 'two'); foreach $word (@Arr) { $name = $word."hash"; Here I should intialise the hash.. lik

Re: "$#{$array} "

2005-07-29 Thread Umesh T G
Hi, On 7/29/05, Vineet Pande <[EMAIL PROTECTED]> wrote: > I don't not understand how the $#{$array_r} returns "highest" element as 4 > and not 5??? > > #!/usr/bin/perl > use warnings; > use strict; > my @array = (1,2,3,4,5); > my $array_r = [EMAIL PROTECTED]; > print "the highest element is numbe

Read a single line in a file.

2005-07-29 Thread Umesh T G
Hello List, I have a file with multiple lines. I want to read only the first line. and a particular word in that line. For eg: File.txt apple,grape,orange,banana some other lines continued. So I want only the word grape here. How to get it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a