#!/usr/bin/perl -w use 5.010; use strict; use warnings; use Cwd qw(); use PDF::GetImages 'pdfimages'; my $path = Cwd::cwd(); my $processing_path = $path.'/newfolder/'; my $images = pdfimages($path.'/file.pdf') or die($PDF::GetImages::errstr); scalar @$images or die("no images in $path"); for (@$images){print "$_\n";}