Re: [Perl-unix-users] parsing user command & parameter text: using split with space as the delimeter

2006-12-05 Thread $Bill Luebkert
listmail wrote: > $command =~ s/(".*) (.*")/$1:$2/g; Try something like: $command =~ s/("[^"]+) ([^"]+")/$1:$2/g; ___ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

[Perl-unix-users] parsing user command & parameter text: using split with space as the delimeter

2006-12-05 Thread listmail
#!/usr/bin/perl -w use strict; use warnings; #the problem started with using split with the space delimeter #this code only demonstrates my attempts to respect quoted strings #while a user enters space separated commands and parameters #command usage: adduser userid password fullname location acce

Re: [Perl-unix-users] parsing ARGV

2005-11-03 Thread listmail
sage - From: $Bill Luebkert <[EMAIL PROTECTED]> Date: Thursday, November 3, 2005 1:50 pm Subject: Re: [Perl-unix-users] parsing ARGV > [EMAIL PROTECTED] wrote: > > > Before I roll my own ARGV parse code I wanted to know if someone > had > > some sample code to get me s

Re: [Perl-unix-users] parsing ARGV

2005-11-03 Thread Jeff D
Take a look at the perl documentation for Getopt::Std (for letter type switches...i.e: "-s") and/or Getopt::Long (for word type switches ). I believe these modules are included with every standard Perl distribution. There are plenty of code samples in the documentation to get you rolling. HTH JD

RE: [Perl-unix-users] parsing ARGV

2005-11-03 Thread Peter Eisengrein
> Before I roll my own ARGV parse code I wanted to know if someone had > some sample code to get me started. I just want to be able to pass > simple switches that contain one parameter each to my perl > app. check out the Getopt module and all it's many variants.

Re: [Perl-unix-users] parsing ARGV

2005-11-03 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > Before I roll my own ARGV parse code I wanted to know if someone had > some sample code to get me started. I just want to be able to pass > simple switches that contain one parameter each to my perl app. I have > looked to the list first for I plan to accept the swi

Re: [Perl-unix-users] parsing ARGV

2005-11-03 Thread pDale
On 11/3/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Before I roll my own ARGV parse code I wanted to know if someone had > some sample code to get me started. Bring up a command prompt and type "perldoc Getopt::Long". Being a long-time Unix geek, I prefer Getopt::Std. -- HTH pDale "...in t

[Perl-unix-users] parsing ARGV

2005-11-03 Thread listmail
Before I roll my own ARGV parse code I wanted to know if someone had some sample code to get me started. I just want to be able to pass simple switches that contain one parameter each to my perl app. I have looked to the list first for I plan to accept the switches in any order, but only allo

RE: [Perl-unix-users] parsing multiple arrays

2004-08-18 Thread Mehta, Perdeep
Thank you everyone for responding to my question. perdeep -Original Message- From: Thomas, Mark - BLS CTR [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 9:26 AM To: Mehta, Perdeep Cc: Perl-Unix-Users (Perl-Unix-Users) Subject: RE: [Perl-unix-users] parsing multiple arrays In

RE: [Perl-unix-users] parsing multiple arrays

2004-08-17 Thread Thomas, Mark - BLS CTR
italNet, Inc. $_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;; > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Mehta, Perdeep > Sent: Tuesday, August 17, 2004 9:53 AM > To: [EMAIL PROTECTED] > Subject:

Re: [Perl-unix-users] parsing multiple arrays

2004-08-17 Thread David Greenberg
It's not recursive, but it should do the job... my %ids = (); foreach (@arr1) { $ids{$_}++;} ... foreach (@arr8) { $ids{$_}++;} foreach (keys(%ids)) { print $_ if $ids{$_} == 8; } This assumes that each array contains only unique ids. -David On Tue, 17 Aug 2004 08:53:21 -0500, Mehta, Perdeep <[

[Perl-unix-users] parsing multiple arrays

2004-08-17 Thread Mehta, Perdeep
Hi, I have a set of 8 1D arrays each containing around 100 to 150 ids. I want to recursive parse each array to find what is common and unique across all 8 arrays and print that out. Does any one know of an algorithm or has an idea that recursively could do the task? Thanks in advance for your

Re: [Perl-unix-users] Parsing

2002-10-07 Thread Jon Shorie
On Monday 07 October 2002 04:50, [EMAIL PROTECTED] wrote: > Hi, > > Assuming you've parsed your CSV file and are just looking for the phone > number which is in a string... > > If your telephone numbers are north-american only, then the problem is > fairly trivial because you always have the same

Re: [Perl-unix-users] Parsing

2002-10-07 Thread ronan
Hi, Assuming you've parsed your CSV file and are just looking for the phone number which is in a string... If your telephone numbers are north-american only, then the problem is fairly trivial because you always have the same pattern for numbers (if people did not throw in extention numbers,

Re: [Perl-unix-users] Parsing

2002-10-07 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > Hello, > > I have a some data files in different formats that I want to parse into > one file under a new standard format. > > The different formats are below: > > Format 1) > Vanderbilt,MI,9899660005,P,"Vanderbilt1 MI, US","Vanderbilt MI, > US",9899660005 >

[Perl-unix-users] Parsing

2002-10-07 Thread jna
Hello,   I have a some data files in different formats that I want to parse into one file under a new standard format.   The different formats are below:   Format 1)     Vanderbilt,MI,9899660005,P,"Vanderbilt1 MI, US","Vanderbilt MI, US",9899660005 Format 2)     Calgary,AB,403-770-4904,N Fo

Re: [Perl-unix-users] parsing files by date within dir

2002-09-12 Thread $Bill Luebkert
Terry Vaughn wrote: > Hello. Can someone fwd me a snibbet of code to identify all files within a >specified unix directory with a specific create date so that only those files are >opened and operated on. Thanks. This can be packed into tighter code (doing most of the work with a grep on read

Re: [Perl-unix-users] parsing files by date within dir

2002-09-12 Thread Anthony E.
find . -type f -ctime 5 finds files in the current directory who's creation time is 5 days ago. see "man find" there is also -atime which is access time, not necessarily changed (ctime). --- Terry Vaughn <[EMAIL PROTECTED]> wrote: > Hello. Can someone fwd me a snibbet of code to > identify all

Re: [Perl-unix-users] parsing files by date within dir

2002-09-12 Thread jimmy
Terry, Take a look at find2perl. -- James Schappet http://www.schappet.com On Thu, 12 Sep 2002, Terry Vaughn wrote: > Hello. Can someone fwd me a snibbet of code to identify all files within a >specified unix directory with a specific create date so that only th

[Perl-unix-users] parsing files by date within dir

2002-09-12 Thread Terry Vaughn
Hello. Can someone fwd me a snibbet of code to identify all files within a specified unix directory with a specific create date so that only those files are opened and operated on. Thanks. Terry ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To

[Perl-unix-users] Parsing a e-mail

2002-04-17 Thread Nagesh Reddy
Hi Everyone , I have some queries about parsing a e-mail message stored in unix mail box. I am facing a small problem with my program. My requirements are : " Clients keep sending e-mails to my Unix Inbox with attachments and I need to read each message and sep

Re: [Perl-unix-users] Parsing a file help please

2002-03-05 Thread Craig Sharp
Dave and Phil, Both of your solutions worked just great. Thanks for your assitance. Craig >>> Philip Andrew <[EMAIL PROTECTED]> 03/04/02 04:23PM >>> Craig Sharp wrote: >I am trying to parse a file with the following script: > >. . . . > >1. Look at the sample file that is being used fo

[Perl-unix-users] Parsing a file help please

2002-03-04 Thread Craig Sharp
Hi all, I am trying to parse a file with the following script: #!/usr/bin/perl use strict; open

[Perl-unix-users] Parsing mailbox

2000-11-25 Thread Nikola Knezevic
Hi, is there any module that can parse standard unix mailbox?? +- -- - --- [ http://users.hemo.net/indy ] -- - Knezevic Nikola :: [EMAIL PROTECTED] hemo.net - --- -- - =====-===---+