Code:
foreach my $x (0..$#AoA-1) {
Code:
foreach my $x (0..$#AoA) {
foreach my $x (0..$#AoA-1) {
foreach my $x (0..$#AoA) {
@dates = (
"12/01/2007",
"23/05/1998",
"15/12/2006",
"05/12/2006",
"21/08/1986",
);
@dates = map { $_->[0] } sort(map { [ $_, reverse(split('/', $_)) ] } @dates);
map { print $_."\n" } @dates;
@arr = (
"/this/is/one/path",
"/this/is/another/path",
);
for $path ( @arr ) {
# process the single file $path here !
}
@logFiles = ... # retrieve list of file names from a file or whatever
for $file ( @logFiles {
doWhatYouDoForSingleLogFile($files);
}
for ( $i=0 ; $i<=$#lines ; $i++ ) {
if ( $lines[$i] =~ m(<tgroup\s+cols="(\d+)") ) {
$numCols = $1;
}
elsif ( $lines[$i] =~ m(<row>) ) {
$colCnt = 0;
$start = $i + 1;
}
elsif ( $lines[$i] =~ m(</row>) ) {
$tag = "tsip"; @lines = ( "<tsip:dataFeed=....>", "<tsip><invention>.....</invention></tsip>", "<tsip><invention>.....</invention></tsip>", "<tsip><invention>.....</invention></tsip>", "</tsip:dataFeed>",
$text = "Hello! This is a sentence, and an example. Two commas, one exclamation mark and two dots.";
$hash{ $elements[1] } = $elements[2];
if ($hash{2} eq 'B')
print $data;
else {print $data;
}
open(DATA, "<", "data.csv") or die $!; my %hash; %hash = ( %hash, (split(/,/, $_))[1,2] ) while ( <DATA> );
@lines = (
"[2/3/07 1:55:48:027 EST] 0000000a SystemErr R at com.ibm.ws.runtime.WsServerImpl.bootServerContaine r(WsServerImpl.java:182)",
"[2/3/07 1:55:48:028 EST] 0000000a SystemErr R at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl .java:120)",
);
for ( @lines ) {
($date, $time, $errNo, $errStr, $location) = $_ =~ m(^\[(\d+/\d+/\d+)\s+(.*)\]\s+([\da-z]+)\s+(.*)\s+at\s+(.*)$);
if ( $opt eq "-i" ) {
$i = $opt;
}
if ( $opt eq "-i" ) {
$i = shift;
}
Leave a comment: