in reply to Error coming while using Use Strict

What you want is:

use warnings; 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 @keys = 1 .. 5; my $output_file = ".xml"; for my $val ( @keys ) { $output_file = $val . $output_file; open my $file_handle, '>:utf8', $output_file or die "Cannot open ' +$output_file' because: $!"; print $file_handle "$start\n\t\t<Address>\n"; }

Replies are listed 'Best First'.
Re^2: Error coming while using Use Strict
by choroba (Cardinal) on Oct 13, 2011 at 11:27 UTC
    I doubt the files with longer names are desired:
    54321.xml 4321.xml 321.xml 21.xml