#!/usr/bin/perl use warnings; # can be simplified to just #!/usr/bin/perl -w # this will work even on Windows!! Windows Perl doesn't look # at the path, but it does look at the -w trailing thing. You will see this often at the start of a Perl program: #!/usr/bin/perl -w use strict; #### sub A { my $parm1 = shift; #effect: literally shift off the stack passed } sub B { my ($p1,$p2,$p3) = @_; #effect: make copy from stack passed } #### while ( (print "Enter Command: "), (my $line = ) !~ /^\s*q(uit)?\s*$/i ) { next if $line =~ /^\s*$/; #skip new lines next if $line =~/^\s*skip/i; #skip is a no op command insert if $line =~/^\s*insert/i; #do insert command delete if $line =~/^\s*delete/i; #do delete command #...etc.. } sub insert() {...} sub delete() {...}