in reply to Array function to concatenate
And the output is:#!/usr/bin/perl use warnings; use strict; my @Code = (404,408); my @Portal_Name = ("http://software.com","http://yahoo.com"); my @Text = ("Not found","Request Timeout"); for my $i ( 0 .. $#Portal_Name ) { $Portal_Name[$i] = sprintf "%s %s %s\n", $Code[$i], $Portal_Name[$ +i], $Text[$i]; } for( @Portal_Name ) { print; }
C:\Code>perl array_cat.pl 404 http://software.com Not found 408 http://yahoo.com Request Timeout
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Array function to concatenate
by johngg (Canon) on Oct 10, 2008 at 21:21 UTC | |
by gowrisub (Initiate) on Oct 11, 2008 at 02:27 UTC | |
|
Re^2: Array function to concatenate
by Zen (Deacon) on Oct 10, 2008 at 16:49 UTC |