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
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
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
> 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.
[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
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
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
In general, when you have basic algorithmic task such as below, I recommend
first using http://search.cpan.org to find out if someone has packaged the
functionality you need as a module. Usually you find such a module. And in
fact, I found List::Compare, which seems to do exactly what you have
requ
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
<[
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
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,
[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
>
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
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
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
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
16 matches
Mail list logo