foreach my $line (<FILE>)
{
my ($comment) = $line =~ /^\#(.*)$/;
}
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 12, 2002 15:12
> To: [EMAIL PROTECTED];
> [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: A regular expression question
>
>
> I have a cron file which the line looks like this:
>
> 00 22 * * * perl -S queue_submit.pl esd-foundry "perl -S
> host-scrubber.pl"
> #build host scrubber
> 30 22 * * * perl -S queue_submit.pl esd-foundry "perl -S
> group-scrubber.pl"
> #build group scrubber
> 30 22 * * * perl -S queue_submit.pl esd-foundry "perl -S
> object-scrubber.pl"
> #build object scrubber
>
> I want to get the comment after # of each line(not including
> "#"), how could
> I do this?
>
> Thanks a lot in advance!
>
> Lixin
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>