file n directory operation


/ Published in: Perl
Save to your folder(s)



Copy this code and paste it in your HTML
  1. my $out = 'bklighting.xml';
  2. open (OUTFILE, ">>$out") or die("output file cannot ");
  3. close(OUTFILE);
  4.  
  5. my $workdir = "./html";
  6. opendir(DIR, $workdir) || die "can't opendir $workdir: $!";
  7. my @htmls = readdir(DIR);
  8.  
  9. #shift away dot directory
  10. shift @htmls;
  11. shift @htmls;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.