Last night I was thinking about many different things, when suddenly a thought appeared in my mind.
my $love_src = "Love.src"; open(HEART, "<$love_src") or die("HEART not opened.\n");
After a few minutes of meditation I understood my $path was wrong. So I tried to find better one...
$love_src = "Love.src"; open(HEART, "<$love_src") or warn("HEART not opened.\n");
And then I understood that I know nothing. Because then you have to close the HEART, or a compilation error occures.
And what should I do now?

Regards to all PerlMonks
Piotr Filip M. (pfm)

Replies are listed 'Best First'.
Re: (nrd) Never Ending Stream
by newrisedesigns (Curate) on Oct 21, 2002 at 14:01 UTC
Re: Never Ending Stream
by UrsaloFF (Novice) on Oct 21, 2002 at 17:15 UTC
    My proposition is:
    my $love_src = "Love.src"; unless(open(HEART, "<$love_src")){ open(open(HEART, ">$love_src")); print HEART "You must be mine:-)))\n"; close(HEART); }
    or little bit brutal:
    my $love_src = "Love.src"; if ((not open(HEART, "<$love_src")&&(-f $love_src)){ `rm love_src`; }