On Saturday, June 8, 2002, at 04:49 , John W. Krahn wrote:
[..]
> for ( split/(\d+-\d+(?::\d+)?),?/ ) {
> next unless /\d/;
> @x = /(\d+)/g;
> if ( /-/ ) {
> print "@x", @x == 2 ? " 1\n" : "\n";
> }
> else {
> do {
> @y = ();
> unsh
Rasoul Hajikhani wrote:
>
> Hello folks,
Hello,
> I am trying not to re-invent the wheels. So I was wondering whether
> there is a little program that you good people might know of the would
> do the following for me:
>
> Here's an example:
>
> input: 1,2,3,4,5,6,17-25,32-101:4
> output:
> 1
Rasoul --
...and then Rasoul Hajikhani said...
%
% I am sorry but I guess I did not explain my self quite clearly:
% I am not looking for syntax help, but rather a package, program that has
% the intelligence to parse the command line args, regardless of how many,
% and return an intelligent res
Nikola Janceski wrote:
>
> oops. extra dot
>
> ..
>
> perldoc perlop
>
> > -Original Message-
> > From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, June 07, 2002 3:59 PM
> > To: 'Rasoul Hajikhani
27;s for you to figure out.
It's also not very elegant :-).
Aloha => Beau.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 9:50 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Help with Ranges
Hello folks,
I am trying not
Rasoul Hajikhani wrote at Fri, 07 Jun 2002 21:49:41 +0200:
> Here's an example:
>
> input: 1,2,3,4,5,6,17-25,32-101:4
> output:
> 1 6 1
> 17 25 1
> 32 100 4
>
> output is "start end increment"
>
>
> also, frames can be duplicated:
>
> input: 1,2,3,4,5,6,17-25,32-101:4,1,2,3,5
> output:
> 1 6
Nikola, et al --
...and then Nikola Janceski said...
%
% ...
Fixed to .. per your followup, but I still don't get it.
%
%
% is the operator.
%
% for ( 1 .. 1000 ){
% print "$_\n";
% }
I just don't see how this would help him. What this will do is spit out a
bunch of numbers,
oops. extra dot
...
perldoc perlop
> -Original Message-
> From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 07, 2002 3:59 PM
> To: 'Rasoul Hajikhani'; [EMAIL PROTECTED]
> Subject: RE: Help with Ranges
>
>
> ...
>
>
...
is the operator.
for ( 1 .. 1000 ){
print "$_\n";
}
> -Original Message-
> From: Rasoul Hajikhani [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 07, 2002 3:50 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Help with Ran
Hello folks,
I am trying not to re-invent the wheels. So I was wondering whether
there is a little program that you good people might know of the would
do the following for me:
Here's an example:
input: 1,2,3,4,5,6,17-25,32-101:4
output:
1 6 1
17 25 1
32 100 4
output is "start end increment"
10 matches
Mail list logo