Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Perl Worst Practices

by teamster_jr (Curate)
on Jun 21, 2006 at 09:16 UTC ( #556609=note: print w/replies, xml ) Need Help??

in reply to Perl Worst Practices

the following errors:
Can't call method "Tgoto" on an undefined value at line 50. END failed--call queue aborted. Can't call method "Tgoto" on an undefined value at line 27. END failed--call queue aborted.
can be fixed by adding:
use Term::Cap; our $OFS=Tgetent Term::Cap;
to the start of the file.
which makes it sort of work, but i might be missing something....


Replies are listed 'Best First'.
Re^2: Perl Worst Practices
by Hue-Bond (Priest) on Jun 21, 2006 at 10:36 UTC

    Of course the program does Tgetent at the appropriate moment. It's that some systems do weird things when $/ is undef:

    use Term::Cap; $/=undef; my $t=Term::Cap->Tgetent ({TERM=>undef, OSPEED=>38400}); __END__ failed termcap lookup on xterm at - line 3

    So I had to stick a local $/ = "\n" there as a quick fix.

    David Serrano

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://556609]
[Lady_Aleena]: File::Find doesn't have a simple sub wanted example, like get the name of the file.
[Discipulus]: there is also find2perl with your perl installation
[Discipulus]: and in the wanted sub you just calculate the duretion and add it the total, stop
[shmem]: sub wanted { push @files, $File::Find::name if $File::Find::name =~/\.mp3$/ }
[Lady_Aleena]: shmem, that is understandable! The two examples in File::Find don't make sense to me on a quick glance.
[marioroy]: LA if the find worked from Unix command line, or does it not. Likely a quoting issue inside Perl qx.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2017-04-23 20:52 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (432 votes). Check out past polls.