Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to match where the lice starts with ^/ .How can i do it?


Error:

Use of uninitialized value in bitwise xor (^) at


What I have tried:

<pre
open my $project_file, '<', $input_dir;
chomp(my @store_files = <$project_file>);
#print @store_files;
close $project_file;
foreach my $temp_line(@store_files)
{
if( $temp_line =~ /^EVISION_OCATION:/){
my @fetch_path=split (':',$temp_line);
my $new_path=$fetch_path[1];
print $new_path;
last;
}
}

if(my $new_path ^/)
{
$input_dir=$new_path;
}
else
{
$input_dir.=$new_path;
}
>
Posted
Updated 23-Mar-17 0:57am

1 solution

The error message contains a line number. See that line.
It is probably this one:
if(my $new_path ^/)

Try
if(my $new_path =~ /^\//)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900