manish.rathi has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: __END__ and (.)
by kyle (Abbot) on Feb 16, 2009 at 16:59 UTC

    You're going to have to give us some more context than that for us to be able to answer correctly.

    My guess is that you have something like this:

    while (<>) { if ( /__END__/ ) { # condition 1 } if ( /(.)/ ) { # condition 2 } }

    Condition 1 matches a line with the literal text "__END__" on it somewhere. The second condition matches any line that has anything on it (not blank lines), and it puts whatever one character it matches into $1 (see perlvar).