in reply to Can Perl add single quotes?

reality_test( $test_me, '$test_me', $min, $max );

Not really what you wanted, eh? But, I recommend it because you really want to write:

isInRange( $cntFiles, 'Number of Files', $minFiles, $maxFiles );
because print sends stuff to the person using your script, not to the person writing your script. The person using your script shouldn't need to know what names you gave to your variables.

Something more like what you want would be:

isInRange( *test_me, $min, $max ); sub isInRange { my( $glob, $min, $max )= @_; my $val= $$glob; my $name= substr($glob,1); if( $val < $min ) { die "\$$name is less than $min.\n" } elsif( $max < $val ) { die "\$$name is more than $max.\n" } else { return 1; } return !1; }
but that doesn't work with lexical variables (which are the types of variables you should use 95% of the time) and doesn't work under use strict (which is what you want to use 95% of the time). So "just say 'no'".

Then there is the C preprocessor option... Actually, it isn't really much of an option. Nevermind. Trust me; you don't even want to know.

        - tye (but my friends call me "Tye")