How to run a basic Perl script?
I am on a shared host that uses cPanel. My aim is to use ExifTool, which can be installed from cPanel. But with not too much knowledge about Perl I am stuck.
What I managed so far:
I did a test.pl and put that into cgi-bin - and it worked fine!
[CODE=perl]#!/usr/bin/perl -w
print "Content-type:text/html\n\n";
print "hello world";
Multible tries with #!/usr/bin/exiftool so far failed. So how do I run a Perl module, or better, a Perl module in a PHP environment?
Multible tries with #!/usr/bin/exiftool so far failed. So how do I run a Perl module, or better, a Perl module in a PHP environment?
-
Try perl -T #!/usr/bin/perl -T use 5.010; use CGI; use strict; use warnings; my $q = CGI->new(); say $q->header(), $q->start_html(); my $file = '../_new.jpg'; $file = '../DSC4883.jpg'; use Image::ExifTool qw(:Public); my $exifTool = new Image::ExifTool;0
Please sign in to leave a comment.
Comments
2 comments