in reply to printing up until a certain line within a file

I think you can do this with the .. operator but I'm not sure if this is the best way. Maybe this will help, though:
#!/usr/bin/perl -w use strict ; if (open (my $file, '/testfile')) { while (<$file>) { print if 1../^## START/ ; } close $file ; }
Update: Oops, forgot to mention, the .. operator is documented in perlop. Thanks c.