1

i am running a perl script from a linux machine to log onto a router remotely to collect data. few of my client requirements include screenshots of specific configs. i tried using

Imager::Screenshot

But each time it is printing a black screen. Is there a better way to capture screenshots of the router output, rather capturing the screenshot of the linux screen would work well for me as well.

Thanks in advance

1 Answers1

0

Please refer this coding:

sub new {
    my $class  = shift;
    my @params = ();
    @params = @{shift()} if _ARRAY0($_[0]);
    my $image = Imager::Screenshot::screenshot( @params );
    unless ( _INSTANCE($image, 'Imager') ) {
    Carp::croak('Failed to capture screenshot');
    }

    # Hand off to the parent class
    return $class->SUPER::new( image => $image, @_ );
}

give thanks to: Taking Screenshot in perl

Community
  • 1
  • 1
ssr1012
  • 2,573
  • 1
  • 18
  • 30