OP = operator ?
here is what I have from what you told me.
Code:
#!/usr/bin/perl -w
use Time::localtime;
str1=`date "+%d%m%y"`;
open (FILE,"<traffic_TLG");
foreach $line (<FILE>) {
if ($line =~ m/beth/) {
open (FILE, ">>log_$str1.txt");
@items = split(",",$line);
print FILE $items[4], ",", $items[10], ",", $items[15], ";" . "\n";
close(FILE);
}
}
close (FILE);
I get a cannot modify a constant scalar error when I run it. Otherwise the program works. why does'n it work?