aboutsummaryrefslogtreecommitdiff
path: root/vcrop
diff options
context:
space:
mode:
Diffstat (limited to 'vcrop')
-rwxr-xr-xvcrop6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcrop b/vcrop
index e93ac8b..4703cbc 100755
--- a/vcrop
+++ b/vcrop
@@ -1,17 +1,17 @@
#!/usr/bin/env perl
+use v5.36;
use strict;
use warnings;
use File::Basename qw<fileparse>;
use File::Temp qw<tempdir>;
-sub usage {
+sub usage() {
die "Usage: $0 <file|url> crop1 [, crop2 ...]\n";
}
-sub crop {
- my ($file, $crop) = @_;
+sub crop($file, $crop) {
my ($from, $x, $y, $plus, $to) = $crop =~ /^(\d+(:\d{1,2}){0,2})(-(\+)?(\d+(:\d{1,2}){0,2}))?$/;
unless ($from) {
print "Error: invalid crop '$crop' (ignoring)\n";