The napster.pl client included with MP3::Napster uses a similar sub to the one below to recieve a list of names in the channel:
However, this returns: Argument "DSL" isn't numeric in printf at perl/duskster/test.pl line 116. I was informed that printf is unecessary in perl, and that there are far better ways to do it. Any suggestions/fixes will be greatly appreciated :)109 sub names 110 { 111 unless ($nap_object->channel){ 112 print qq-No current channel\n-; 113 return; 114 } 115 foreach ($nap_object->users) { 116 printf "\t([ %-20s ]) (%-9s)(%4d)\n",$_,$_->s +haring,$_->link; 117 } 118 }
In reply to printf confusion by dusk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |