#! C:\perl\bin\perl require "include/common.cgi"; use CGI; use File::Find::Rule; print "Content-type: text/html\n\n"; open(FIL,"songdetails.txt"); %info = split(" -> ",join(" -> ",split("\n",join('',)))); close(FIL); #$filename = $info{'Filename1'}; $artist = $info{'Artist1'}; $song = $info{'Title1'}; #$query = new CGI; #$artist = $query->param('a'); #$song = $query->param('t'); $artist =~ s/(\.\.|\/|\\|\:|\?|\*|\<|\>|\")//g; $song =~ s/(\.\.|\/|\\|\:|\?|\*|\<|\>|\")//g; my @files = File::Find::Rule->file()->name( "*$song*" )->in( "D:\\Documents\\Lyrics\\$artist" ); #print "$song"; #print join(' ',@files); #print length(@files); open(FIL,$files[0]); @FIL = ; close(FIL); $content = join('',@FIL); #print $content; $content =~ s/\r//g; $content =~ s/\n/\/g; $content = "
Song lyrics: $artist - $song

" . $content; $pagetitle = " - Song lyrics"; &runtemplate();