Off topic

2002-10-16 Thread Anidil Rajendran-Raj
Hi, Sorry to ask this OT question. But i am sure I can get help here. I was looking for a good Linux admin mailing list. Thanks in advance

Re: Group and concatenate

2002-10-06 Thread ANIDIL RAJENDRAN
Paul, Try this. it is pretty easy while () { print "$1 $2;$3\n" if $_ =~ /^(\d+)\s+(\w+)\s+(\w+)$/; } __DATA__ 222xxxJ 222wwwDD 222ccffFFF 909eee 909FFF 909j 888JJJ 888HHH Anidil Patinatiyil Rajend

Re: Is there a searchable archive for this list

2002-10-02 Thread ANIDIL RAJENDRAN
2 10:10 AM Subject: Re: Is there a searchable archive for this list > on Tue, 01 Oct 2002 15:24:40 GMT, Anidil Rajendran wrote: > > > I dont find any search option in following site > > > > http://archive.develooper.com/beginners%40perl.org/ > > Try >

Is there a searchable archive for this list

2002-10-01 Thread ANIDIL RAJENDRAN
I dont find any search option in following site http://archive.develooper.com/beginners%40perl.org/ Thanks - Anidil Patinatiyil Rajendran Burlingame,California 650 730 8271 (W)

Re: Hide a string while saving it to file

2002-09-27 Thread ANIDIL RAJENDRAN
Try this to encode your file. Decoding I beleive you can do. open (FILE, "C:\\perl\\original\.txt" ) or die ; open (FILE1,">C:\\perl\\converted\.txt") or die ; while () { @ascii = unpack("C*", $_); foreach $val (@ascii) { $val++; } $_ = pack("C*", @ascii); print FILE1; } close(FILE); close(FI

Re: Help with regular expression

2002-09-26 Thread ANIDIL RAJENDRAN
Try this if you want regex. This may not be the appropriate but works. @list = ('1992','1993 (summer)','1995 fall'); foreach (@list) { push @array, $1 if $_ =~ /(\d+)\s*.*$/; } print map {$_,"\n"} @array; regards Rajendran Burlingame,CA - Original Message - From: "Shaun Bramley" <[

Re: head as in "unix"

2002-09-19 Thread ANIDIL RAJENDRAN
- Original Message - > Nkuipers wrote: > > >>e.g. I have a file with a header - and I only need the data from line > >>100 and forward where the single lines are put in to a array for further > >>"treatment". > > > > should probably be "$. == 100" but this is a bit better: > > last if($.

Counting the same word

2002-09-17 Thread ANIDIL RAJENDRAN
Hi, I want to count the number of times a particular word occured in a file. Though the following script is working, is it possible to shorten it? -- open (FILE,"C:\\proj\\order\.txt") or die "cannot open file: $!"; %seen = (); while () { while ( /(\w['\w-]*)/g) { $seen{lc $1}++; } }

Re: Book on Perl!

2002-09-07 Thread ANIDIL RAJENDRAN
The 3rd edition is definitely good. You can also try PERL BY EXAMPLE by ellie quigley. Perl Cookbook is definitely a must. good luck =rajendran Burlingame,CA - Original Message - From: "Ebaad Ahmed" <[EMAIL PROTECTED]> To: "Nitin Yogishwar" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Se

Re: converting a list into array

2002-09-05 Thread ANIDIL RAJENDRAN
Hi, The answer is in your question. Cheers - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 04, 2002 1:49 PM Subject: Re: converting a list into array > The script gave a syntax error at > > chomp(my @data = ); > > However, when I tri

Cookbook example

2002-09-04 Thread ANIDIL RAJENDRAN
Newbie again. Sorry if this question sounds so silly Want to open filenames like ~username/blah but open doesn't interpret the tilde to mean the home directory Solution expand the filename manually with substitution $filename =~ s{ ^ ~ ( [^/]* ) } { $1

Skipping the UID above 60000

2002-09-01 Thread ANIDIL RAJENDRAN
ext if $fields[2] > $skip; $highestuid = ($highestuid < $fields[2]) ? $fields[2] : $highestuid; } close(PW); print "The next available UID is " . ++$highestuid . "\n"; Thanks for any suggestion. Anidil Rajendran Redwood Shores,CA 650 730 8271

Newbie question

2002-03-25 Thread Anidil Rajendran-Raj
Firstname Lastname 650 156 7190:somfield:somefield:somefield Firstname Lastname 408 256 7290:somfield:somefield:somefield Firstname Lastname 510 3456 7390:somfield:somefield:somefield **more lines here *** Firstname Lastname 415 3456 7390:somfield:somefield:somefield I have

newbie question

2002-03-25 Thread Anidil Rajendran-Raj
Firstname Lastname 650 156 7190:somfield:somefield:somefield Firstname Lastname 408 256 7290:somfield:somefield:somefield Firstname Lastname 510 3456 7390:somfield:somefield:somefield I have the above lines in a file and I am trying to create an array of = phone numbers open (FILE,"thefile") or

Book suggestion

2002-02-22 Thread Anidil Rajendran-Raj
Hi team, I am unix admin trying to learn perl. How is the book "LEARNING PERL BY EXAMPLE" by Ellie Quigley regs Anidil Rajendran (raj) Netliant,Inc 3600,Brigde Parkway Suite 102 Redwood City,CA 94065-1170 (650) 730 8271 <>