# No.70 Perl Sample (code key - 75) # Using the input file twice (入力されたファイルを2回ループする) # Tomonori Nagano # Last Update: January 18, 2008 # # This file is encoded in Unicode (UTF-8). If you see gibberish characters, # please re-encode the file in utf-8. # $filePath = $ARGV[0] ; # read the first command-line argument # open the file with a file handle INFILE open (INFILE,$filePath) or die "cannot open file:$!\n" ; while(){ print lc($_) ; } close (INFILE) ; # opne the file again open (INFILE,$filePath) or die "cannot open file:$!" ; while(){ print uc($_) ; }