perlquestion Jalcock501 Hi Guys I've been writing a script which loads files from a CD, asks the user for the specific file they are after and loads that into a different directory under a different name.<p>i.e</p> <code>Fileblah -> tempdir -> Rename -> finaldir</code> <p>The question is how do I get rid of the user input so that they just run the script automatically and it can check for the correct file.</p>Here is my code so far <code>#!/usr/bin/perl -w use strict; use File::Copy; use warning; my $np_new = 'usr/castle/np_new/' my $temp = 'usr/castle/pctemp' system("clear"); system("mount /dev/cd0 /mnt"); system("cp /mnt/* $temp/."); system("umount /mnt"); my %dest = (SO_PC => 'PCMAP.BIN', MS_PC => 'FULLPC.BIN', SO_CV => 'CVFULLPC.BIN', MS_MC => 'MBFULLPC.BIN'); print "\n" x 5, "\t" x 3, "Input required: "; chomp $fileName; my $fileName = <STDIN>; for my $search (keys %dest) { die "$fileName does not exist!" unless -e $fileName; copy ($fileName, $np_new.'/usr/castle/pctemp/'$dest{$search}) if $fileName =~ /^$search/i; }</code> The files always come in as one of the four<p>SO_PC(refnum).BIN</p> MS_PC(refnum).BIN<p>SO_CV(refnum).BIN</p> MS_MC(refnum).BIN