Felix Geerinckx wrote at Tue, 20 Aug 2002 11:29:33 +0200:
>> or still shorter:
>> my %data = map {chomp; split /= /} `myapp`;
>
> Shorter yet:
>
> my %data = map {split /= |\n/} `myapp`;
my %data = map {split /=?\s/} `myapp`
:-)
Well, I still would prefer my first solution,
as it is m
on Tue, 20 Aug 2002 08:20:50 GMT, [EMAIL PROTECTED] (Janek
Schleicher) wrote:
> or still shorter:
> my %data = map {chomp; split /= /} `myapp`;
Shorter yet:
my %data = map {split /= |\n/} `myapp`;
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
Connie Chan wrote at Tue, 20 Aug 2002 09:10:41 +0200:
>> C++ program's output looks like this:
>>
>> A= 20
>> B= 30
>> C= 70
>> AVG= 40
>> MIN= 30
>> MAX= 70
>> TIME= 0.0037
>>
>> If I call this in Perl:
>>
>> #!/usr/bin/perl -w
>> my $result = `myapp`;
>
> replace as :
> my @results = `myapp
> C++ program's output looks like this:
>
> A= 20
> B= 30
> C= 70
> AVG= 40
> MIN= 30
> MAX= 70
> TIME= 0.0037
>
> If I call this in Perl:
>
> #!/usr/bin/perl -w
> my $result = `myapp`;
replace as :
my @results = `myapp`;
> exit;
>
> there is output myapp saved in $result
>
> How to move va
I need help with this:
C++ program's output looks like this:
A= 20
B= 30
C= 70
AVG= 40
MIN= 30
MAX= 70
TIME= 0.0037
If I call this in Perl:
#!/usr/bin/perl -w
my $result = `myapp`;
exit;
there is output myapp saved in $result
How to move values from $result to my vari