Re: File Manipulation ??

2008-04-30 Thread J. Peng
On Thu, May 1, 2008 at 5:04 AM, Andy <[EMAIL PROTECTED]> wrote: > > Basically I need to be able to pull the latest data. > > for instance > > 155073040~06/04/1998 > 155073040~04/28/1998 > 155073040~04/29/1998 > > Has 3 Id Numbers for the same data. > > If Id's are the same Pull Latest Data?

Re: File Manipulation ??

2008-04-30 Thread Gunnar Hjalmarsson
Andy wrote: Hiya Guys Well I am new, and still trying to learn perl... Do not multi-post!! http://groups.google.com/group/comp.lang.perl.misc/browse_frm/thread/bb85e891b4b9435a -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

File Manipulation ??

2008-04-30 Thread Andy
Hiya Guys Well I am new, and still trying to learn perl...while at work on 10 different thingssheesh is there ever enough time to learn something.. Needless to say I need to accomplish the following. Data Below 155073040~06/04/1998 155073040~04/28/1998 155073040~04/29/1998 255256040~04/29/

Re: Array element split, with grep

2008-04-30 Thread Gunnar Hjalmarsson
Steve Bertrand wrote: Can someone explain to me how I can fix this up to achieve my desired results? my $time = (split (/:/, (grep (/^info/, @contents[0]; A sample snip of data: this382:3828 info447:4729 that274:9294 ...and I just want the $time to become info447. my $time; ($t

Re: Array element split, with grep

2008-04-30 Thread John W. Krahn
Rob Dixon wrote: Steve Bertrand wrote: Can someone explain to me how I can fix this up to achieve my desired results? my $time = (split (/:/, (grep (/^info/, @contents[0]; A sample snip of data: this382:3828 info447:4729 that274:9294 ...and I just want the $time to become info447. The

Re: Array element split, with grep

2008-04-30 Thread John W. Krahn
Steve Bertrand wrote: Hi all, Hello, Can someone explain to me how I can fix this up to achieve my desired results? my $time = (split (/:/, (grep (/^info/, @contents[0]; A sample snip of data: this382:3828 info447:4729 that274:9294 ...and I just want the $time to become info447. my

Re: I want a perl script for?

2008-04-30 Thread Rob Dixon
Vinayak dutt wrote: > > As am new to Perl and their is a requirment which says - > > 1. There exists a .zip which contains folders and file. > > 2. Search for 'makefile' in the respective folders and store them in a text > file. > > 3. And search for .c files in them and list them in separate text

Re: Array element split, with grep

2008-04-30 Thread Rob Dixon
Steve Bertrand wrote: > > Can someone explain to me how I can fix this up to achieve my desired > results? > > my $time = (split (/:/, (grep (/^info/, @contents[0]; > > A sample snip of data: > > this382:3828 > info447:4729 > that274:9294 > > ...and I just want the $time to become info447

Re: Array element split, with grep

2008-04-30 Thread Steve Bertrand
Steve Bertrand wrote: Hi all, Can someone explain to me how I can fix this up to achieve my desired results? my $time = (split (/:/, (grep (/^info/, @contents[0]; I figured it out :) my $time = (split (/:/, (grep (/^info/, @contents))[0]))[0]; I neglected to realize that the result fr

Array element split, with grep

2008-04-30 Thread Steve Bertrand
Hi all, Can someone explain to me how I can fix this up to achieve my desired results? my $time = (split (/:/, (grep (/^info/, @contents[0]; A sample snip of data: this382:3828 info447:4729 that274:9294 ...and I just want the $time to become info447. The way I think it works is: - gre

Re: I want a perl script for?

2008-04-30 Thread Octavian Rasnita
From: "Vinayak dutt" <[EMAIL PROTECTED]> Am vinayak here. As am new to Perl and their is a requirment which says - 1. There exists a .zip which contains folders and file. 2. Search for 'makefile' in the respective folders and store them in a text file. 3. And search for .c files in them

Re: perl source code encryption

2008-04-30 Thread Jenda Krynicky
From: Jerald Sheets <[EMAIL PROTECTED]> > I have to second what Chas. is saying here. > > The "perl way" doesn't lend itself well ideologically to what you're > attempting to do. If you wanted to hide your source, or create a > proprietary product, maybe perl wasn't the best route for you. >

Re: I want a perl script for?

2008-04-30 Thread Jenda Krynicky
From: "Vinayak dutt" <[EMAIL PROTECTED]> > Am vinayak here. > As am new to Perl and their is a requirment which says - > 1. There exists a .zip which contains folders and file. Have a look at the Archive::Zip module. > 2. Search for 'makefile' in the respective folders and store them in a text >

Re: removing duplicates

2008-04-30 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > From: "John W. Krahn" <[EMAIL PROTECTED]> > >> Rob Dixon wrote: > >>> obdulio santana wrote: > May be this helps > > perl -lne "print if ++$D{$_} == 1" address.txt > >>> You may prefer the cuteness of > >>> > >>>

Re: perl source code encryption

2008-04-30 Thread Jerald Sheets
I have to second what Chas. is saying here. The "perl way" doesn't lend itself well ideologically to what you're attempting to do. If you wanted to hide your source, or create a proprietary product, maybe perl wasn't the best route for you. Call it a language, call it a scripting language,

Formatting output after search and replace

2008-04-30 Thread melody
I have 2 files one has the input and the other has data that will replace specific string in file 1 eg File 1 - Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced File 2 - replaced1 replaced2 replaced3 Output --

I want a perl script for?

2008-04-30 Thread Vinayak dutt
Hi All, Am vinayak here. As am new to Perl and their is a requirment which says - 1. There exists a .zip which contains folders and file. 2. Search for 'makefile' in the respective folders and store them in a text file. 3. And search for .c files in them and list them in separate text file. 4. Th