Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Why isn't my array populating?

by artist (Parson)
on Mar 27, 2008 at 15:19 UTC ( #676757=note: print w/ replies, xml ) Need Help??


in reply to Why isn't my array populating?

The information could be take as String rather than Array from the `command`. Following works.

#! /usr/local/bin/perl use strict; my $perlInfo = `perl -version`; my @perlInfo = split /\n/, $perlInfo; foreach my $line (@perlInfo) { print "- $line\n"; }
--Artist


Comment on Re: Why isn't my array populating?
Download Code
Re^2: Why isn't my array populating?
by chromatic (Archbishop) on Mar 27, 2008 at 16:09 UTC

    In list context, qx returns a list. That's not the problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://676757]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-09-19 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (133 votes), past polls