Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Scalar result from array

by Generoso (Vicar)
on Dec 03, 2010 at 16:33 UTC ( #875215=note: print w/ replies, xml ) Need Help??


in reply to Scalar result from array

May be this is what you are trying to do?

#!/usr/bin/perl -w # use strict; my @shows_to_find = <DATA>; print "Data input \n"; foreach (@shows_to_find){print;} print "\n", '-' x (60), "\n"; my @dl_nzb = (); my $nzb_url = 'url '; my $amp = ' amp '; my $cat_id = 'cat_id '; my $api_username_url = 'url2 '; my $api_username = 'user name '; my $api_key_url = 'url 3 '; my $api_key = 'key'; foreach my $y(@shows_to_find) { chomp($y); my $show_nzb_d = $nzb_url.$y.$amp.$cat_id.$amp.$api_username_u +rl.$api_username.$amp.$api_key_url.$api_key; push(@dl_nzb,$show_nzb_d); } foreach (@dl_nzb){print;print"\n";} print "\n", '-' x (60), "\n"; __DATA__ abc dft45.xml ert rt653.xml abc ert57.xml

Result:

perl "C:\Documents and Settings\16916\My Documents\new 4.pl" Process started >>> Data input abc dft45.xml ert rt653.xml abc ert57.xml ------------------------------------------------------------ url abc dft45.xml amp cat_id amp url2 user name amp url 3 key url ert rt653.xml amp cat_id amp url2 user name amp url 3 key url abc ert57.xml amp cat_id amp url2 user name amp url 3 key ------------------------------------------------------------ <<< Process finished. ================ READY ================


Comment on Re: Scalar result from array
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-09-23 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (239 votes), past polls