All I'm trying to do is pass two string variable and one array of strings to a perl module. That module then appends those values to a file. The most success I've had so far is the file only getting the first value out of the array, but that's by fudging the call. This is where I'm at.
If I...
Hi KevinADC
The array is full of strings that I need to write to file. I'm getting closer, but I'm just changing things to see what effect they have. I can get rid of the
ARRAY(0x8234d10)
in the file, by changing my call to the module to
update_time_log($name, $desc, @time);
so removing...
Thanks for the replies, but I'm still not there.
My declaration is now
my ($new_cron) = $_[2];
Here is what the loop looks like now
my($tempTime);
foreach $tempTime (@$new_time)
{
print FILES "$tempTime\n";
}
However, on the file line that receives $tempTime I don't get an array value, I...
I'm trying to pass a couple of vars and an array to a perl module, but I can't seem to get the syntax correct. The module has the following code
my ($new_name) = $_[0];
my ($new_desc) = $_[1];
my (@new_time) = $_[2];
print FILES "$new_name\n";
print FILES "$new_desc\n";
foreach my($tempTime)...
hi mbrooks
Surely that is just going to assign the string 'SomeBashScript.sh' to a variable called $script_out.
If there is another way to call a bash script, I'd be interested to know.
Thanks
I'm getting an error in my Apache log whenever I call specific a script. The script uses the following notation to fire off a bash script;
qx[SomeBashScript];
the error that keeps appearing is as follows
file mcoputils.cc: line 238 (static std::string Arts::MCOPUtils::mcopDirectory())...
I have a checkbox array that I need to pass to a function, but I'm having problems. My html for the array is as follows:
<input name="chkRpt[]" type="checkbox" id="rptTue" value="2" />
<input name="chkRpt[]" type="checkbox" id="rptWed" value="3" />
<input name="chkRpt[]" type="checkbox"...
Got it, I had typo'ed on your Exporter stuff, and had corrected it slightly based on the error log, so the syntax was perfect, but perfectly incorrect.
Thanks for all your help this week mbrooks. I would be in a very worried place this weekend if you hadn't helped me out.
Well as far as I can see I'm all OK
1. Everything is in the root cgi-bin
2. That last 3 lines of the pm are
1;
the full listing is below
3. All exactly as written
and my pm is as follows
package filelog;
use strict;
use vars qw( @ISA %EXPORT_TAGS @EXPORT_OK );
require Exporter;
@ISA =...
Well it's working, sort of. I put in the exporter code that mbrooks suggested, but I'm having to call the routine as
filelog::update_log("Filename","Name");
Does that mean my export code isn't working, or have I screwed up elsewhere?
I'm trying to place a subroutine in a perl module and although I have the syntax correct (nothing in the error log) the routine doesn't seem to be getting called.
The key items from the main script are as follows;
use filelog;
update_log2("Filename", "Name");
obviously the call is within the...
Got it sorted. My modules were fine, a couple of the scripts were missing -w from the perl location and that was throwing the server.
Thanks for all the help
Thanks for the replies. I can now add modules to perl alot easier than I could yesterday.
I'm still having problems though. I installed CGI::Cookies using the following command
perl -MCPAN -e 'install CGI::Cookie'
and everything installs OK. if I do
perl -MCGI::Cookie -e 1
then perl returns...
I'm trying to get Mega Uploader to work, but I need MCookie installed. I've had a look on CPAN for modules called cookie, but there are loads of them. Does anyone know which one I should be using?
A link to the Mega Uploader site is below
http://www.raditha.com/megaupload/faq.php
with the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.