I am having an issue where it appears that nothing is getting "executed" outside the <% %>. I can even put junk there...nothing happens. I guess I don't really care about the "junk" scenario...what I'm simply trying to do is a javascript "alert". It works on the main .asp script, but when I...
All,
I have the following snippet of perl code:
@results = `make abc.exe 2>&1 | grep -P '((undefined reference to|\.exe)\s)'`;
This command works fine from the shell prompt, but within my perl script nothing is returned into @results?? Any ideas on why this is the case...and what to do about...
Is there a way to define the text "TRUE" to be interpreted as 1 and "FALSE" interpreted as 0? For example:
$a = "FALSE";
if (!$a) {
print "IT IS FALSE\n";
}
In the above, I'd like it to print "IT IS FALSE\n";
Thanks!
How do you "undefine" an Array of Hashes of Arrays? It must not be as simple as:
undef @AoHoA;
because, I can't seem to get that do work?
I have @AoHoA that is filled. I want to clear that structure out completely...so that the test (for example):
if (defined($AoHoA[0]))
fails. That is, it's...
I am wanting to send a fortran date (what form should this be...real*8, integer*8, etc...???) into a C function, then that C function return if the input date is in Daylight Savings time or not. Any ideas on how I could pass this info back and forth from Fortran to/from C?
Thanks in advance!!
I'm running Fortran on Linux, using the Intel compiler (11.x). My INQUIRE statements are telling me that UNIT=0 is OPENED. When I look at the filename, it tells me "/dev/pts/1". This is code that I've ported from VMS to Linux. Does VMS and Linux fortran differ in that UNIT 0 is now the terminal...
I'm using the Intel compiler on Linux.
I'm attempting to pass a Fortran string variable defined as:
CHARACTER*(*) THIS
to a C function. I've passed character strings from Fortran to C MANY times...with no real issues. However, trying to pass a variable declared as above, proves very...
Is there a way to determine if your perl script is being run directly:
./script.pl
or called from another script:
require("script.pl");
during runtime?
I have some scripts that can either be called directly or via a "require". The script has a return(1) in it...which is perfect for the...
Anyone have a good way to set the system time...preferably, platform independently? In specific, I need to take the current date, and adjust the time + or - an hour.
Thanks in advance!
All,
This is kind of an odd issue...but, "fun" for all you guru's, I bet! This one has stumped me for awhile now.
I am writing a code converter (please keep that in mind...because that SHOULD limit the possible solutions). The issue I've run into is that I need to do a substitution "on the...
I have an alias set in my bash shell, say:
THISALIAS='this.exe'
In my perl script, I want to execute this alias...something like:
system("THISALIAS");
Any ideas on how I can access the alias in order to execute it?? Thanks in advance!
I am trying to figure out how to deploy the needed perl packages (best practice) out to multiple machines. On my local machine, I use perl -MCPAN -e 'install xxx::yyy'. I don't want to run this on every machine, I just want to deploy the necessary files for xxx::yyy (which may have many...
Does anyone know of a good module...or, has anyone actually written a script that I can gleen from...to be able to print reports to a printer, query/set the printer for information (like maybe the loaded stock or portrait/landscape, etc...) and query the queue for certain information (like job...
I have an evironmental variable that I set in perl, $ENV{HELLO} = 1. I want to call (system or `) an executable that will read and/or set this to a different value. It seems that the initial read works, but the setting appears to only be set for the .exe's children and not visible to the calling...
I'm trying to count the number of "A" characters in a string that are not preceeded AND followed by a "C". So:
$string = "ABCACAB";
should come back with a count of 2 "A" characters. Any ideas/suggestions? I tried:
$count = 0;
$count++ while ($string =~ m/(?<!C)A(?!C)/g);
but count returns...
I have a line of text...say:
"My.File, your.File, another.file, SOMEBODY.file"
I want to "loop" thru the line, grabbing each filename (in this example) that contains an uppercase letter, and do something with that word.
For example:
$changed = 1;
while ($changed) {
$changed = 0;
if...
Ok, this SHOULD be easy, but for some reason I'm having a hard time with it. I want to match on '"' (double quote) but not when it's preceded by a backslash ('\"').
I tried this:
$string =~ /[^\\]\"/
but, it doesn't work. I've also tried all sorts of variations on this...but, can't get it to...
Is there a way to programmatically determine if my current script is running in the background or foreground? My script is either run in the foreground or background, and I need to know which it is to prompt or don't prompt the user for information.
Thanks in advance!!
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.