CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
__END__ and (.)

 



jigneshjsoni
User

Feb 15, 2009, 8:33 PM

Post #1 of 2 (1074 views)
__END__ and (.) Can't Post

what does it mean by "/__END__/" and "(.)" in the conditional statement ?


ranisahoo
New User

Feb 16, 2009, 10:36 AM

Post #2 of 2 (1065 views)
Re: [jigneshjsoni] __END__ and (.) [In reply to] Can't Post

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).

In Reply To

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives