blakee
Programmer
- Jan 18, 2005
- 22
I'm on windows xp pro and useing Active Perl.. When I try to execute this file it has 1 error, 'can't modify in scalar assignment file.pl line 3 near ""test.cgi";"' Heres the .pl:
!#usr/local/bin/perl
$data_file="test.cgi";
open(DAT, "$data_file") || die("Error: Could not open file");
@raw_data=<DAT>;
close(DAT);
foreach $test_cmt (@raw_data)
{
chop($test_cmt);
($t_name,$t_cmot,$t_action)=split(/\|/,$test_cmt);
print "When Test talks to $t_name there is a $t_cmot and does this weird $t_action\n";
}
!#usr/local/bin/perl
$data_file="test.cgi";
open(DAT, "$data_file") || die("Error: Could not open file");
@raw_data=<DAT>;
close(DAT);
foreach $test_cmt (@raw_data)
{
chop($test_cmt);
($t_name,$t_cmot,$t_action)=split(/\|/,$test_cmt);
print "When Test talks to $t_name there is a $t_cmot and does this weird $t_action\n";
}