![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to store the values in a file into an array | risshanth | UNIX for Dummies Questions & Answers | 3 | 01-22-2008 10:34 AM |
| How to read from txt file and use that as an array | pinky | UNIX for Dummies Questions & Answers | 4 | 10-08-2007 12:18 AM |
| create array holding characters from sring then echo array. | rorey_breaker | Shell Programming and Scripting | 5 | 09-28-2007 08:42 AM |
| Dump an array in a file | IMD | Shell Programming and Scripting | 3 | 08-31-2006 10:04 AM |
| File to Array and Back. | Boucho | High Level Programming | 1 | 02-14-2006 11:32 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I would take it for guaranted that you had asked for in perl
![]() Code:
#! /opt/third-party/bin/perl
open(FILE, "< filename") || die "Unable to open file. <$!>\n";
while( chomp($content = <FILE>) ) {
push(@arr1, $content);
}
#If this needs to be displayed
foreach my $var(@arr1) {
print "$var\n";
}
close(FILE);
exit 0
|
|
||||
|
thanks a lot
|
| Sponsored Links | ||
|
|