The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 04-29-2008
KevinADC KevinADC is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2008
Posts: 731
one way:


Code:
use strict;
use warnings;
my @data = ();
open (IN, 'path/to/file') or die "$!";
while(<IN>) {
   push @data,$1 if (/'([^']+)'/);
}
close IN;
print "$_\n" for @data;