#!/usr/bin/perl -w use strict; use File::Slurp; my $abs_loc = '/path/to/my/xml/files'; opendir(DIR,$abs_loc) or die($!); my @xml_files = grep { /\.xml$/i and -f } readdir DIR; closedir DIR; for (@xml_files){ my $xml_content = File::Slurp::slurp("$abs_loc/$_"); # ... print STDERR "$xml_content\n"; }
In reply to Re: File open
by leocharre
in thread File open
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |