Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • use IO::File;
    $now = IO::File->new(">>.now");
    $now->autoflush(1);
    open( MP , "mplayer *.mp3 -shuffle 2>/dev/null |");

    while(<MP>)
    {
        if(/Playing/)
        {
            print NOW $_;
        }
    };
  • If you wanted to use mpg123, and were willing to live with overkill, you could use this, with a bit of file IO added. I only mention it because it's only two days old and still in my head...

    http://rjbs.manxome.org/hacks/perl/mprand
    --
    rjbs