in reply to Text Manipulation

Getting the data between the º characters isn't a problem in Perl. The thing I had to do to figure this out was to find the ASCII value for º, which is 186. Using the ACSII value, you can match the character and use that to get your data. The following example gets everything between the º characters and pushes it to a new array.
#!/usr/bin/perl -w use strict; my $file = "test.txt"; # Text file to open my @newtext; # array to hold target data my $char = chr(186); # ACSII character º # Open the file open(FILE, "<$file") || die "Couldn't open $file: $!\n"; # If the contents of each line matches the º character at the beginnin +g and end of the line, # push it onto an array. while(<FILE>) { if(/$char(.+)$char/) { push(@newtext, $1); } } close FILE; # Print out the results foreach(@newtext) {print "$_\n";}
See chr for how that function works.
Rich36
There's more than one way to screw it up...