S
Sooraj S
Hi,
I want to read all the data from a file into an array. But if there
is any "#" character in the file it should be replaced with "&"
character. How to store "$_" into an array?
This is my code:
my @tmp_arr;
open(IN,"<./ip_file");
while(<IN>)
{
if(/#/)
{
s/#/&/g;
}
-------------- //add ur code here
}
close(IN);
foreach(@tmp_arr)
{
print "$_";
}
I want to read all the data from a file into an array. But if there
is any "#" character in the file it should be replaced with "&"
character. How to store "$_" into an array?
This is my code:
my @tmp_arr;
open(IN,"<./ip_file");
while(<IN>)
{
if(/#/)
{
s/#/&/g;
}
-------------- //add ur code here
}
close(IN);
foreach(@tmp_arr)
{
print "$_";
}