On Sun, Jul 29, 2012 at 11:19 PM, Andy Bach wrote:
> On Sun, Jul 29, 2012 at 10:01 AM, lina wrote:
>> Strangely, it only substituted once, but not for the later once.
>> Thanks ahead for your suggestions, I don't know why,
>
> Not exactly sure what you're up to - but you only open fh1 once - so
>
On Sun, Jul 29, 2012 at 10:01 AM, lina wrote:
> Strangely, it only substituted once, but not for the later once.
> Thanks ahead for your suggestions, I don't know why,
Not exactly sure what you're up to - but you only open fh1 once - so
the inner while in your sub is going to read until eof and c
Hi,
I have written something as following,
my $template_file="template";
my $h_data_file="h_data";
open my $fh1, '<', $template_file;
open my $fh2, '<', $h_data_file;
while(<$fh2>){
my ($h11,$h21,$h22,$h33)=split ' ', $_;
&substitute($h11,$h21,$h22,$h33);
say $h11,$h21