Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (26 sloc) 663 Bytes
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
use Cwd;
my @videos;
my $directoriovideos;
my $directoriopelis;
my $maxelementarray;
#@videos = `ls`;
push @videos, `ls`;
chomp (@videos);
$maxelementarray = $#videos;
my $peliescogida;
$peliescogida = int(rand($maxelementarray));
print Dumper @videos;
print $peliescogida . "\n";
print "Pelicula a ejecutar: $directoriopelis/$videos[$peliescogida]". "\n";
my $rutafinal = "$directoriopelis/$videos[$peliescogida]" . "\n";
print cwd;
#`vlc $rutafinal`;
#exec("vlc $rutafinal");
system("vlc $rutafinal");
Something went wrong with that request. Please try again.