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
#!/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
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
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
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
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:
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
<[
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
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
>
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
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
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
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
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
Hi all,
I am trying to parse a file with the following script:
#!/usr/bin/perl
use strict;
open
Hi, is there any module that can parse standard unix mailbox??
+- -- - --- [ http://users.hemo.net/indy ] -- -
Knezevic Nikola :: [EMAIL PROTECTED]
hemo.net
- --- -- - =====-===---+
24 matches
Mail list logo