Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

RE: RE: MP3 server with IO::Socket

by perlmonkey (Hermit)
on Jun 04, 2000 at 07:08 UTC ( #16261=note: print w/replies, xml ) Need Help??


in reply to RE: MP3 server with IO::Socket
in thread MP3 server with IO::Socket

Thanks for your comments. I was surprised, but you seem to be correct on the open statement. In the perlopentut document the two different syntax's used are:
open FILE, "foo.txt" or die $!; #or open(FILE, "foo.txt") || die $!;
I did not realize that perl would parse 'or' and '||' differently.

As for the print, you are also correct, but fortunately my logic still worked. print returns undef if it failed, but the logic still held because if you use the numeric operator '==' on undef it is equivalent to 0. So this code will work: print "hello\n" if undef == 0; But I modified the code as you suggested to be more explicit.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://16261]
help
Chatterbox?
[Eily]: Hi monks o/
[choroba]: 3 PM in Vietnam, BTW
Discipulus maybe a wrong impression..
[karlgoethebier]: Discipulus: Workshops are for weenies ;-)
[Discipulus]: here 43C high umidity, tiger mosquitos, violence in the street.. everywhere is vietnam
[karlgoethebier]: OK, i'm socially unacceptable
[karlgoethebier]: Discipulus: Were the hell are you today?
[Discipulus]: ..or suitable for the presidence ;=)
[Discipulus]: at Caput Mundi
[marto]: choroba, have you moved to Vietnam or just there for a while?

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2017-06-27 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (600 votes). Check out past polls.