#!/usr/bin/perl
#for ($counter=0; $counter<=200 $counter++) {
###while (defined($nextname = <p???????.jpg>)) {


#while (defined($nextname = <p00009??.jpg>)) {
while (defined($nextname = <v???.jpg>)) {
  # create filenames
  $filev = $nextname;
  $filer = $filev;
  $filer =~ s/v/r/;
  printf("about to generate $filer from $filev\n");
# `jpegtran -rotate 90 $filev > $filer`;# -trim with d1 same size therefore ok
 `jpegtran -rotate 270 $filev > $filer`;# -trim with d1 same size therefore ok
}

