my $image_name = "heybuddy.jpg"; my $image_full = "/home/temp/$image_name"; #image full path to the temp file my $status = getstore($video_src, $image_full); #uses getstore to retrieve image and to be stored in the temp path. die "Error $status on $video_src" unless is_success($status); #### open(IN, ">/home/images/$image_name") or die "Can't open: $!"; binmode IN; while (<$image_full>) { print IN; } close IN or die "Can't close: $!"; }