Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    
  2. or download this
    use warnings;
    
  3. or download this
    opendir(THISDIR,"e:\\perl\\comics\\");
    my @comics=readdir(THISDIR);
    close(THISDIR);
    
  4. or download this
    my @comics=glob 'e:/perl/comics/*';
    # or 'e:/perl/comics/*.png', according to your description
    
  5. or download this
    foreach (reverse(@comics)) {
    
  6. or download this
       my ($name,$ext)=split(/\./,$_);
    
  7. or download this
    ls -1 *.png | perl -lne '$o=$_; s/(\d+)/sprintf "%03d", $1/e; rename $
    +o, $_'