Technically, this isn't a server side question but it is a Perl question and this seems to be the only Perl forum here!

I want to specify part of a Perl script such that it will only get executed if I pass a specific command line parameter. For example, if I specify --build-all on my command line, the whole script will get processed - but if I don't pass that parameter, part of the script will get skipped. Here's the kind of thing:-

#! e:/program files/perl/bin/perl.exe

$major = 1;
$minor = 3;
$micro = 7;

sub process_file
        my $outfilename = shift;
	my $infilename = $outfilename . ".in";
	open (INPUT, "< $infilename") || exit 1;
	open (OUTPUT, "> $outfilename") || exit 1;
	while (<INPUT>) {
	    print OUTPUT;

process_file ("my-project-config.win32");

if (build-all-specified)
process_file ("my-project.rc");
process_file ("my-project.some_other_file");
I want the blue section to get skipped unless I specify --build-all as a parameter when running the script. I'm sure this is probably child's play for an experienced Perl programmer but I'm very unfamiliar with Perl. How can I do it?