The txt files are not that large (about 1000 lines usually) What I want to achieve is this : get all occurrences of :
Orderbook ID: ID_ Symbol: xxxxx xxxxx ISIN: SExxxxxxxxx
and print it out like so : ID:ISIN:SYMBOL
for example : ID_:SExxxxxxxxxx:xxxxx xxxxx
This is what I've written now :
use strict; use warnings; use File::Basename; use Text::ParseWords; open (FILE, $ARGV[0]); sub getValue { $_ =~ s/\s//g; my ($name, $value) = split(/:/); chomp($value); return $value; } while (<FILE>) { my (@ID,@ISIN,@SYMBOL); if ($_ =~ m/ID:/) { @ID = getValue($_); } if ($_ =~ m/ISIN:/) { @ISIN = getValue($_); } if ($_ =~ m/Symbol:/) { @SYMBOL = getValue($_); } my @FULLVAR = (@ID,@ISIN,@SYMBOL); my $num = 0; my $count = 0; foreach (@ID,@ISIN,@SYMBOL) { printf "$_:"; } } } else { print "You need to specify an input file \n"; print "Usage : ".basename($0)." difffile.txt \n"; exit; }
can everybody please change all of the log file data to the following DUMMY data? please! it's really important!!Orderbook ID: XXX Symbol: DUMMY 00OXX ISIN: SE000123456 Market: Plain Dummy SE ## inactivationTime: [2012-01-01T00:00:00] => [2012-01-10T00:00:00] ## XML/Warrant/ReimbursementDay: [2012-01-06] => [2012-01-10] ## XML/Warrant/LastTradedDay: [2012-01-06] => [2012-01-10] ## unpublicationTime: [2012-01-01T00:00:00] => [2012-01-10T00:00:00
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |