gharris999;475620 Wrote: > > > Code: -------------------- > > > if (!$command) { > return -1; > } > -------------------- > > > ..which is probably better practice, anyway.
I wouldn't think so. More Perlish, maybe. Better? *(!$command)* returns true for $command = undef, $command = 0, $command = "", and who knows what else. Maybe you simply need to initialize with *my $command = undef;* -- then your defined() would be crystal clear. *(!$command)* is the kind of foolishness I really dislike in loosely typed languages. -- peterw http://www.tux.org/~peterw/ free plugins: http://www.tux.org/~peterw/#slim AllQuiet BlankSaver ContextMenu FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher SettingsManager SleepFade StatusFirst SyncOptions VolumeLock ------------------------------------------------------------------------ peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107 View this thread: http://forums.slimdevices.com/showthread.php?t=48521 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins