Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: CJason
  • Content: Threads
  • Order by date
  1. CJason

    javascript not executing

    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...
  2. CJason

    Execute shell commands, capture output problem

    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...
  3. CJason

    Define &quot;TRUE&quot; as 1

    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!
  4. CJason

    undef AoHoA

    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...
  5. CJason

    Send date/time from fortran to C

    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!!
  6. CJason

    INQUIRE with UNIT=0

    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...
  7. CJason

    Passing Fortran CHAR*(*) to C

    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...
  8. CJason

    Determine if run directly or called?

    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...
  9. CJason

    Make all variables &quot;local&quot;

    Is there a way to make all variables "local"...or, do you have to declare each one as local?
  10. CJason

    SET system time

    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!
  11. CJason

    Inline substitution

    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...
  12. CJason

    Get/Execute bash shell alias

    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!
  13. CJason

    Deployment Image with Perl Packages

    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...
  14. CJason

    Linux printing/querying from Perl

    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...
  15. CJason

    Pass %ENV to and from a .exe

    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...
  16. CJason

    Count matches...with exclusions

    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...
  17. CJason

    Match strings that contain uppercase letters

    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...
  18. CJason

    Pattern matching exclusion

    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...
  19. CJason

    Determine if running in background

    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!!
  20. CJason

    &quot;global&quot; flush buffer

    Is there away to make the default action for all perl scripts be "$| = 1"? If so, can someone let me know how to do that? Thanks in advance!

Part and Inventory Search

Back
Top