in reply to Re: Error coming while using Use Strict
in thread Error coming while using Use Strict
hi,
use strict; my $start='<?xml version="1.0" encoding="utf-8"?> <MultifamilyProperty xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta +nce" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'; my @key=("1","2","3","4","5"); my ($file_handle,$output_file); $output_file=".xml"; for(my $i=0;$i<$#key;$i++) { my $val=$key[$i]; $output_file=$val.$output_file; open($val,'>:utf8',"$output_file"); print $val $start."\n"; print $val "\t\t".'<Address>'."\n"; close $val; }
You may understand this code
print $val $start."\n"; which is used to assigning $start variable content to my each file handler
Regards,
Senthil
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Error coming while using Use Strict
by jethro (Monsignor) on Oct 13, 2011 at 10:03 UTC | |
by Anonymous Monk on Oct 13, 2011 at 10:12 UTC | |
by choroba (Cardinal) on Oct 13, 2011 at 10:30 UTC | |
by jethro (Monsignor) on Oct 13, 2011 at 14:02 UTC | |
|
Re^3: Error coming while using Use Strict
by Corion (Patriarch) on Oct 13, 2011 at 11:13 UTC |