Adding a perl script to automator

Hi
I have a script that do a search and replace in a file in Perl. This script work just fine when executed from the command line, but in automator it result in an empty file.
Any idea?
Eventually I want to replace the $file variable with the arguments passed from previous actions, but for now I'm "in debug mode" only.
Here is the basic of the script:
my $file="full Unix path to file";
my $search="that text";
my $replace="this text";
my @contents;
open (F, $file) || die "Can't open - $!\n";
@File = <F>;
close (F);
open (F, ">$file") || die "Can't open - $!\n";
for (@File) {
s/$search/$replace/g;
push(@contents,$_);
# Go to the beginning of the file
seek(F,0,0);
# Update the contents with the data from our array
print F (@contents);
close(F);

Hi,
It looks like the script action for Perl in Automator is buggy...
- First, when I select perl in the shell selection, save the workflow, close it then reopen it, the revert back to bash! This cannot work for sure for Perl...
- Also, from what I can see in the debug tests I made, that is the push command that does not work correctly. Instead of pushing the value of $_ (current file line in this case) it add blank (nothing) to the $contents variable. That's why the file goes empty at the end.
So that's really a bug in Automator, as I cannot see any other reason, the scrpt works well in standalone mode (from terminal).

Similar Messages

  • Folder Action to Launch Perl Script

    Hello.
    I wrote a perl script which I wanted to execute when a file was dropped into a folder. I added a folder action with a very simple applescript:
    on adding folder items to this_folder after receiving added_items
    do shell script ¬
    ("perl /Users/Alexander/Library/Scripts/gte2.pl")
    end adding folder items to
    The folder action didn't do anything, any thoughts on what I'm doing wrong? Note, the perl script works fine when I run it from the terminal.
    thanks.

    Thanks Camelot, I appreciate the help. My script below is trying to read data from a file in folder in my system. So I will try your suggestion, I didn't realize the environment and path my be different.
    Regards Alex
    #!/usr/bin/perl -w
    #This program is to convert files from gamin running GPS watch to text file which can be loaded into excel.
    # To make executable, remember to set: chmod u+x <file>
    #set all the flags. Note the flags are used to stop the matching
    $i = 1; $k = 0; $start = "no";
    #Open data file and find values
    open(DATA,"/Users/Alexander/Alex's Misc/Health/Garmin_Conversion/run.tcx") || die "Couldn't open file*\n";
    #read in the data line by line until "end of file"
    while (<DATA>){
    #start parsing for information to keep
    if (/.<Id>./) {
    @Idline=split(/>/);
    @Idbeat=split(/T/,$Idline[1]);
    $Id=$Idbeat[0];
    if (/.<Track>./){
    $start = "yes";
    if ($start eq "yes"){
    if (/.<Time>./) {
    @timeline=split(/T/);
    @timebeat=split(/Z/,$timeline[2]);
    $Time[$i]=$timebeat[0];
    elsif (/.<LatitudeDegrees>./) {
    @HRline=split(/>/);
    @HRbeat=split(/</,$HRline[1]);
    $Latitude[$i]=$latbeat[0];
    elsif (/.<LongitudeDegrees>./) {
    @longline=split(/>/);
    @longbeat=split(/</,$longline[1]);
    $Longitude[$i]=$longbeat[0];
    elsif (/.<AltitudeMeters>./) {
    @altline=split(/>/);
    @altbeat=split(/</,$altline[1]);
    $Altitude[$i]=$altbeat[0];
    elsif (/.<DistanceMeters>./) {
    @distline=split(/>/);
    @distbeat=split(/</,$distline[1]);
    $Distance[$i]=$distbeat[0];
    elsif (/.<Value>./) {
    @HRline=split(/>/);
    @HRbeat=split(/</,$HRline[1]);
    $HR[$i]=$HRbeat[0];
    $i++;
    } #string matching
    } #if start flag is yes
    } #while data loop
    close (DATA) || die "couldn't close file.\n";
    #write all data to file in space delimited format
    open (NEWFILE, ">/Users/Alexander/Alex's Misc/Health/Garmin_Converted/$Id run") || die "can't create file.\n";
    $Time[0]="Time"; $Latitude[0]="Latitude"; $Longitude[0]="Longitude"; $Altitude[0]="Altitude"; $Distance[0]="Distance"; $HR[0]="HR";
    print NEWFILE "0 $Time[0] $Latitude[0] $Longitude[0] $Altitude[0] $Distance[0] $HR[0]\n";
    for ($j = 1; $j <= $i; $j++) {
    $k=$j+1;
    print NEWFILE "$j $Time[$j] $Latitude[$j] $Longitude[$j] $Altitude[$j] $Distance[$j] $HR[$j]\n";
    } #for j loop
    close (NEWFILE) || die "couldn't close newfile.\n";
    #This is the end of the program

  • How to disable "This Connection is Untrusted" warning in firefox using shell or perl script running on Linux Platform

    We have QA automation jobs that invoke user interface tests in Firefox running on a virtual Linux host.
    My tests perform regression, but I'm held up because of the Firefox This Connection is Untrusted warning.
    My current requirement is to ignore this connection untrusted warning, which comes up when accessing an HTTPS website and i want this to be disabled through either a shell or a Perl script.
    I can do this manually using the steps below, but this will not work for my current problem since the virtual Linux hosts are created dynamically on submission of automation jobs.
    Go to Tools > Options > Advanced "Tab"(?) > Encryption Tab Click the "Validation" button, and uncheck the checkbox for checking validity.
    Is there any Perl or shell script that disables this certificate warning?

    There might be an add on to accomplish this:
    *[https://addons.mozilla.org/en-US/firefox/addon/skip-cert-error/ Skip Cert Error]
    However if we cannot find a solution there might be another place for support:
    *[https://support.mozilla.org/en-US/kb/where-go-developer-support Where to go for developer support]

  • Facing Problem in Perl Script

    Hi ,
    I m facing one problem in perl script.
    Oracle Database 10g.
    DBD::Oracle::db selectall_arrayref failed: handle 2 is owned by thread 225ffc not c
    urrent thread 1c4f8ac (handles can't be shared between threads and your driver may
    need a CLONE method added) at c:\perl\update_card_numbers_oracle.pl line 258, <STDI
    N> line 1.
    Thx in advance....

    There are forums here at OTN for Perl related issues ... this isn't it.
    Return to the list of all forums and find the one where your inquiry belongs.

  • Oracle Driver fails on PERL script

    I am trying to run a PERL script that accesses the Oracle database library. I get the following error:
    install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230.
    at (eval 16) line 3
    Compilation failed in require at (eval 16) line 3.
    Perhaps a required shared library or dll isn't installed where expected
    I've looked, and the Oracle.so file is located in the path where it says it cant find it and the libclntsh.so.10.1 is located in the $ORACLE_HOME directory. The $ORACLE_HOME is set to /opt/instantclient_10_2 where the libclntsh.so.10.1 file is located, I also set $LD_LIBRARY_PATH to :/opt/instantclient_10_2 where the libclntsh.so.10.1 file is located. I can't seem to figure out why it won't work. Are there any other environment variables that need to be set? It seems to me that the Oracle driver should be found. Any insights would be greatly appreciated.
    Also, when I print the $ENV{'ORACLE_HOME'} variable in PERL, it doesn't print anything out. Could that be the problem?
    Thanks!
    Edited by: 804130 on Oct 21, 2010 8:59 AM
    Edited by: 804130 on Oct 21, 2010 9:24 AM

    It seems like it must be a problem with the $ORACLE_HOME value. I added the following line at the beginning of the script:
    print $ENV{'ORACLE_HOME'};
    and I get the following error message:
    Use of uninitialized value in print at ./get_closed_TR.pl line 17.
    The environment variable is set in my .bashrc profile and exported. It displays properly when I echo $ORACLE_HOME, but apparently the PERL script can't see it.
    Any ideas? Thanks again!

  • Help! I want a perl script for test

    I am not familar with perl and XMLDB.
    The database which managed by other team report the following errors.
    They said the error was caused by the perl scipt which contents a statment using XML object.
    So I want a perl script for test.
    Please help me.
    oracle 9.2.0.3.0
    Alert.log
    ORA-00600: internal error code, arguments: [qmxarElemAt2], [0], [], [], [], [], [], []
    listener.log
    connect_data=(sid=###)(cid=(PROGRAM=perl@###)(USER=oracle)))*(ADDRESS=(PROTOcol=tcp)(host=)
    establish###
    Edited by: 964446 on Oct 10, 2012 6:10 AM

    I can't check on iTunes until tomorrow morning, but in the meantime I can tell you what's wrong with your original feed. The top two lines read
    <?xml version="1.0"?>
    <rss version="2.0">
    They should read
    <?xml version="1.0" encoding="UTF-8"?>
    <rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
    Without the itunes URL in the second line iTunes cannot parse the required tags to show your episodes. I would guess that the line was there originally but got removed, after which iTunes would not recognize new episodes. Put it back and reload the feed, and it should work if iTunes hasn't terminated your podcast in the meantime.
    But to answer your original question: assuming you have access to both feeds; copy everything in the original feed from the first <item> to the last </item> near the bottom.
    In the new feed, find the last </item> tag at the bottom (just above the </channel> and </rss> tags), start a new line just after it and insert the material you posted from the original feed (though there are an awful lot of episodes there, and though it's technically not a problem you might want to consider whether you really need all of them in the feed).
    If you don't have direct access to the feeds but are using one of the podcast creation services which don't allow this, you will have to follow whatever method they provide for adding the episodes, possibly one at a time.

  • [solved] Perl script for pacman updates in Conky

    Hi
    I've been using this script in Perl Conky to check on updates. It works well.
    It's not mine - I got it here;
    http://bbs.archlinux.org/viewtopic.php?id=57291
    #!/usr/bin/perl
    ## script by Xyne
    ## http://bbs.archlinux.org/viewtopic.php?id=57291
    use strict;
    use warnings;
    my $n = (`pacman -Qu | wc -l`);
    chomp ($n);
    if ($n == 0)
    print "System up to date"
    elsif($n == 1)
    print "1 new package"
    else
    print "$n new packages (inc. IgnorePkg) "
    I have some packages listed in IgnorePkg in pacman.conf - is there a way to exclude them from the packages counted in $n?
    I thought something like this would help but I don't see how to take only part of a line from IgnorePkg
    http://www.perlfect.com/articles/perlfile.shtml
    Thanks for any help
    EDIT I added a --ignore clause to the pacman query. Seems to have worked. Sorry to waste your time.
    Last edited by Bazzaah (2012-07-04 09:25:46)

    bump...
    Edit: Finally figured it out. My router assigns IP adresses dynamically on each reboot. When my IP adress changed from 192.169.1.2 to 192.168.1.3 the hellaconk script got all confused. Ahh...
    Last edited by Perre (2009-03-12 18:59:40)

  • Cfexecute a Perl script.

    What would I be looking at to run a Perl script at
    d:/path/to/my/perl/loader.pl %year% with a
    <cfexecute...> tag?
    I've tried to do it directly:
    <cfexecute
    name="d:\path\to\my\perl\loader.pl"
    arguments="#year#"
    variable="goodbar"
    errorvariable="foobar"/>
    I've tried to do it through cmd.exe:
    <cfexecute
    name="c:\windows\system32\cmd.exe"
    arguments="d:\path\to\my\perl\loader.pl #year#"
    variable="goodbar"
    errorvariable="foobar"/>
    I've tried calling perl.exe:
    <cfexecute
    name="e:\Perl\bin\perl.exe"
    arguments="d:\path\to\my\perl\loader.pl"
    variable="goodbar"
    errorvariable="foobar"/>
    I am not having much luck with this. The weird thing is that
    I am not
    getting any results OR errors. Just nothing.
    This is a Windows 2003/CF 8.0.1 server.

    Azadi wrote:
    > see if this may be of help in your case:
    >
    http://www.indigostar.com/perl2exe.htm
    >
    > otherwise, isn;t there a perl.exe in a win installation?
    >
    I'll take a look at that if I get desperate enough. But yes
    there is a
    perl.exe on my windows installation. I can easily run the
    script from
    the command line. I am trying to run it from ColdFusion since
    I have
    added a process that runs before the Perl script and I just
    want to fire
    off the Perl code when the ColdFusion code is completed.

  • I want to write a script or Automator workflow/app that emails a random shortcut of the day to three recipients. The source is from an Excel spreadsheet. One column is the shortcut, and the second column is the definition. Anyone have experience?

    I want to write a script or Automator workflow/app that automatically emails a random shortcut of the day to three recipients. The source is from an Excel spreadsheet. One column is the shortcut, and the second column is the definition. Anyone have similar experience and know that this would work?

    I have had a first stab at the script, below.  It uses a file to store the shortcuts and command [descriptions].  You should be able to see from the script annotations how to add a new one.  (I populated 1-4 with real data, but got lazy after that, so you have a few placeholders to work with first.
    As I have noted, once you are happy that you have all the data in the file, you can comment out part of the script for ongoing use.  (BTW, my reluctance to use Excel is that I don't currently have it installed and I don't want to offer wrong advice.  If you have Numbers, I do have that and could probably modify to work with a spreadsheet from there.  This might be especially useful if you have the data already sitting in Excel.)
    A few things came-up whilist I was writing the script:
    1.     Currently, all recipients will not only get the same tip at the same time, but they will see the names and email addresses of the others who receive them.  It is possible to modify this.
    2.     I have added a property gRandomCheck which keeps track of which shortcut has already been used (since the last time the script was compiled.  This will prevent the same tip being sent more than once.    When all tips have been sent once, the script will alert you and not send anything until reset.  It does not check on a per-addressee basis (which would be a refinement).  (If you add a new addressee at this stage, the whole process will start again, and you may not really want this to be the behaviour.)
    3.     The way that I have built the list, commandList, is deliberately cumbersome - it's for the sake of clarity.  If you prefer, you can construct the whole list as {{shortcut:"X", command:"X"}, {shortcut:"Y", command:"Y"}}
    Have a look - I am sure you will have questions!
    SCRIPT STARTS HERE  Paste the following lines (thru the end) into a new AppleScript Editor document and press RUN
    --The property gRandomCheck persists between runs and is used to stop sending the same hint twice.
    property gRandomCheck : {}
    --I am defining a file on the desktop.  It doesn't have to be in this location
    set theFolder to path to desktop
    set commandFile to (theFolder as text) & "CommandFile.csv"
    --(* Unless you need to change the file contents you do not need to write to it each time.  Remove the "--" on this line and before the asterisk about 18 lines below
    --Follow this format and enter as many records as you like on a new line - each with a unique name
    set record1 to {shortcut:"Z", command:"Undo"}
    set record2 to {shortcut:"R", command:"Record"}
    set record3 to {shortcut:"⇧R", command:"Record Toggle"}
    set record4 to {shortcut:"⌘.", command:"Discard Recording & Return to Last Play Position"}
    set record5 to {shortcut:"X", command:"x"}
    set record6 to {shortcut:"X", command:"x"}
    set record7 to {shortcut:"X", command:"x"}
    set record8 to {shortcut:"X", command:"x"}
    set record9 to {shortcut:"X", command:"x"}
    set record10 to {shortcut:"X", command:"x"}
    set record11 to {shortcut:"X", command:"x"}
    set record12 to {shortcut:"X", command:"x"}
    set record13 to {shortcut:"X", command:"x"}
    --Make sure you add the record name before randomCheck:
    set commandList to {record1, record2, record3, record4, record5, record6, record7, record8, record9, record10, record11, record12, record13}
    --This part writes the above records to the file each time.
    set fileRef to open for access commandFile with write permission
    set eof of fileRef to 0
    write commandList to fileRef starting at eof as list
    close access fileRef
    --remove "--" here to stop writing (see above)*)
    --This reads from the file
    set fileRef to open for access commandFile with write permission
    set commandList to read fileRef as list
    close access fileRef
    --Here's where the random record is chosen
    set selected to 0
    if (count of gRandomCheck) is not (count of commandList) then
              repeat
                        set selected to (random number from 1 to (count of commandList))
                        if selected is not in gRandomCheck then
                                  set gRandomCheck to gRandomCheck & selected
                                  exit repeat
                        end if
              end repeat
    else
              display dialog "You have sent all shortcuts to all recipients once.  Recompile to reset"
              return
    end if
    --This is setting-up the format of the mail contents
    set messageText to ("Shortcut: " & shortcut of record selected of commandList & return & "Command: " & command of record selected of commandList)
    tell application "Mail"
      --When you're ready to use, you probably will not want Mail popping to the front, so add "--" before activate
      activate
      --You can change the subject of the message here.  You can also set visible:true to visible:false when you are happy all is working OK
              set theMessage to (make new outgoing message with properties {visible:true, subject:"Today's Logic Pro Shortcut", content:messageText})
              tell theMessage
      --You can add new recipients here.  Just add a new line.  Modify the names and addresses here to real ones
                        make new to recipient with properties {name:"Fred Smith", address:"[email protected]"}
                        make new to recipient with properties {name:"John Smith", address:"[email protected]"}
      --When you are ready to start sending, remove the dashes before "send" below
      --send
              end tell
    end tell

  • Perl Script to Verify a Database is up and running

    Hi there,
    Can any one suggest a way how to verify if the database is up and running from unix using a perl script? If not ,ofcourse the script will fail. Getting the following error ..
    ERROR: ORA-12203: TNS:unable to connect to destination
    Any suggestions are most valuable to me.
    Thank you,
    Kiran

    Cant we test it with any user other than sysdba? Yes..
    $dbh = DBI->connect("dbi:Oracle:", 'some_user', 'password') or die "Connect E
    rror $DBI::errstr\n";
    can we add this in the existing perl scripts? yes you can but DBI and DBD::Oracle need to be added to perl
    How to execute this? Create a script with your perl code and make it executable e.g. chmod 700 myscript.pl
    How do we know we have DBI module is present to use it? Once you create a script and try to execute it you will get errors on your use DBI statement.
    DB server and unix should be on the same machine right? In this example yes... But you can connect to any db through sqlnet using the tnsnames or with DBI you can do dynamic connections as well. So it will completly bypass tnsnames.ora.
    I would strongly suggest looking at "programming the Perl DBI"
    HTH
    Frank

  • Add a script to Automator's actions, or add an action to Automator's librar

    Total Applescript newbie here. My end goal is to write a script or automator that automatically trims 10 seconds off selected podcasts.
    I know that Doug's Applescript website has something along those lines, but it's not truly automatic.
    What I'd really like to do is attach a folder action so that as soon as they download the end credits are trimmed.
    With automator, it's easy enough to get the finder items in the folder, and pass them to the Set iTunes Info library action, but the Start and End times of iTunes tracks aren't in there.
    I tried to edit the actual script that that calls, but it's not-editable.
    I tried to edit Doug's script, but I can't figure out how to tell it to pick a file from a folder as the selected track to edit.
    I was thinking of an automator action that basically goes along these lines:
    Get Specified Finder Items (preselecting the download folder the podcasts are dumped to)
    Get Folder Contents
    Run this script. (but this is where I can't figure out how to run a script and use the results from the last two automator actions)
    Any ideas appreciated, or suggestion on how to just go pure Applescript on the task. I know the Applescript would read something along the lines of:
    Tell application Finder
    get the folder contents?
    maybe set the file name or track name as a variable
    Tell application iTunes
    Set start of selected file/track to 15

    Ah, you've made me a happy man this evening. I missed the Run AppleScript action in Automator, but knew there had to be a way to do something like that.
    Your particular script doesn't function, it gives an unknown error on completion, but I was able to modify a Doug's AppleScript that lets you trim start or finish on items you manually select and use it as you suggested.
    So here's what I ended up doing.
    Automator Action which is saved as a plug-in to the Folder Actions for the folder for the Podcasts I want to trim. The Automator action reads as follows:
    *Find Sources in iTunes*
    -Find Songs Whose Album Contains MyPodcast
    *Get Selected iTunes items*
    -it's pulling all tracks in that folder, which is fine
    *Filter Sources in iTunes items*
    (I had to do this because before I added this step my selected podcasts showed up in results, but so did any item I had highlighted (such as the current playing track) in the results, and was passed to the final action)
    *Run AppleScript*
    <pre style="font-family:Monaco, monospace;border:2px inset #99f;overflow:auto;width:500px;padding:.5em;color:#000;background:#ccf;">
    on run {input, parameters}
    tell application "iTunes"
    set trackers to input
    repeat with theTrack in trackers
    set start of theTrack to 11
    set finish of theTrack to ((get finish of theTrack) - 18)
    end repeat
    end tell
    return input
    end run</pre>
    There's probably a more elegant way to do this, and faster, as this one takes several seconds to go through the entire iTunes library each time it's ran. That's why I was trying to pass the folder contents directly to the set info action. It's kind of annoying that the built-in Automator action for this is limited on the info items it sets. It would be really cool if Apple didn't make those scripts non-editable. I could have learned exactly what I was after just by picking apart their script.
    Anyways, my motivation for this was partly to learn, but inspired from a particular podcast from a local public radio station that I listen to where they bracket the beginning and end of the podcast with the typical "please donate" stuff. Normally I don't mind a short pre-roll or pledge request, but this particular one the woman has such an annoying voice, it's like fingernails on chalkboard to me, otherwise I wouldn't have bothered spending hours trying to learn how to do this to save 30 seconds of listening on a weekly podcast. LOL.
    Thanks again for your pointer, I'll probably play with this some more if anyone else wants to chime in on better methods, but I'll mark it as answered as it did point me to a working solution.

  • Perl scripting engine

    with jdk6 we have various scripting engines.
    has anyone written one for perl.
    tried google and nothing showed up !!

    Re: the OP's question: I don't know, but I honestly doubt it since the mapping from Java to Perl is so...indirect.... As opposed to something like, say, Ruby, where you can see more correspondences. But then what the hell do I know.
    Also...there is a certain masochism with computer programmers...so even if adding Perl scripting to Java is convoluted, unintuitive, and painful, it will probably happen sooner or later, when someone thinks they have an easy way in and then refuses to drop it after all the pain.

  • Capturing output of shell script in Automator

    I have an Automator work flow that includes the execution of a shell script.  The script in turn executes a Perl script and captures its output on a file.  This may sound a bit convoluted, but the Automator part was intended to automate disparate scripts that were already made, so I just "glued" them together.
    The shell script is like this:
    cd "/Users/username/Documents/Development/"
    ./script.pl "$1" 2>&1 >out.log
    The problem is that, after execution, "out.log" contains the output from STDOUT, but not STDERR.  I know because if I run "script.pl" from the Terminal, I get not only the normal output, but a couple of errors or warnings spit out by the script.
    I was under the impression that "2>&1>out.log" would redirect STDERR to the filehandle used by STDOUT, and then redirect STDOUT to the file, with the ultimate result of redirecting both filehandles to the output file.
    Is there something I'm missing?  How can I capture the STDERR from the script as well?  Keep in mind that the shell script is executed from an Automator work flow.
         Thanks!
         -dZ.

    ./script.pl "$1" >out.log 2>&amp;1
    It is important to redirect in the correct left-to-right order.
    First move STDOUT (file descriptor 1) to the file, THEN move STDERR (file descriptor 2) to where STDOUT is NOW pointing.
    You moved STDERR first, then moved STDOUT, leaving STDERR behind.

  • Missing asmcmdcore perl script from 10.2.0.1

    I am not able to run asmcmd from a command prompt(Windows) it complains that it cannot find the perl script asmcmdcore. I have added the ORACLE_HOME\bin to my path.
    I am running windows 2003 enterprise 64 bit (AMD) service pack 2. I suspect that I am running into 64 bit issues. Where would I find the filethat I need?

    did you run a search for the file under the Oracle Home? Check your env (specifically Path) from command by issuing set.
    C:\set

  • Can an Applet call a Perl script that performs Unix file commands?

    Hi,
    I would like my applet to move a Unix file from one directory to another. (Both directories and the file are on the same server as the applet).
    In my applet I have code that calls (I think) a Perl script through a URL connection and passes the name of the file that needs to be moved:
    URL urlMove = new URL("http://myserver.com/cgi-bin/fileMove.pl?" + fileToMove);
    URLConnection urlConn = urlMove.openConnection();
    In the cgi-bin I have a perl script (fileMove.pl) that performs the move:
    #!/usr/bin/perl
    use CGI qw(:standard);
    $pfile = $ENV{?QUERY_STRING?};
    $cmd = ?mv stageArea/$pfile $pfile?;
    system $cmd;
    The Perl script works fine when I call it directly from Internet Explorer, but when I call the script from the Applet the file is not moved. Am I doing something wrong?

    Got it to work!
    Changed the Java code to:
    URL urlMove = new URL("http://myserver.com/cgi-bin/fileMove.pl?" + fileToMove);
    urlMove.openConnection();
    InputStream moveStream = urlMove.openStream();
    and in the Perl script added the line:
    print "Content-Type: text/html\n\n";
    The applet running my a PC is now effortlessly moving files on the unix server, wahoo.
    Aside: I also found that my applet web server and the files the applet reads/writes do not have to be on the same machine. In the applet's cgi-bin directory I created a "link" to the networked unix directory where the image files are actually located. I really expected the Applet I/O Security to complain, but it work like a charm. Go figure.

Maybe you are looking for

  • Changes made in jsp pages not showing in weblogic 92

    Hi: I am using Weblogic 92. I ran an ant script and it copy the ear file to the following directory. C:\bea92\user_projects\domains\Inquiry\autodeploy This should autodeploy the application but it doesn't seemed to show the changes I made. I also cop

  • Dialog Pop-Up screen with Continue and Cancel Icons

    we should have to enter Purchase Order and Item in the pop-up, How?

  • Right Click not working in DC prespective

    Hi I am facing a unusual issue When I try to  do click on any DC in Inactive / active DC or for that sense in Local DC area also in DC prespective somehow the right click does not work I tried to find some errors in .log file also but no errors are s

  • I can't update my apps in my iPad. Help please.

    I can't update my apps in my iPad. When I press the "update" in my App Store app, it shows nothing. But in the app icon it has already 9 pending updates already. I already turned off my iPad then open it again. I already signed out my apple ID then t

  • Can't update to lollipop 5 z3 compact

    I've tried the repair tool on pc companion, etc. Not sure what other details to post here... The current firmware version is 4.4.4 Kitkat, pc companion and the phone itself keeps saying it's up to date, sony mobile said it was currently on lollipop a