I have a flash movie that at the end navigates to a URL where a PERL script lies and allows the user to open this. I did this because I needed a way to write files on my own machine from flash so I rigged this up.
My PERL script searches for a file with use File::Find and basically converts to a usable .xml file.
My question is when I try to run this perl script through the browser, it just shows the PERL command window and never completes the script, the window is basically frozen. I am trying to run it by just placing the file directory in as the URL. When I run the script through the command line it works just fine. Does anyone know how to get this script working from calling it through the browser? I have also already tried to put the exact library path using “use lib [directory]” of where File::Find is and it still does nothing. Thanks
Code is below…
#!/usr/bin/perl
use File::Find;
$dir = "V:/Application Data/Macromedia/Flash Player/#SharedObjects";
find(/&edits, $dir);
sub edits()
{
if($_ eq 'XMLData.sol')
{
$test = 0;
open(FILEREAD, "< $File::Find::name");
open(FILEWRITE, "> P:/DO-83 Advanced CBT/Flash Development/Courseware/userXML.xml");
while(<FILEREAD>)
{
if($test == 0)
{
print FILEWRITE "<CBT>
";
}
if($test > 0)
{
print FILEWRITE;
}
$test = $test + 1;
}
}
}
close FILEWRITE;
close FILEREAD;