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 Andrzejek 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: *

  1. AcidHawk

    Regex Question

    Hi, I am having difficulty groking this regex stuff. I have a string: "SomeStuff D: Drive is full" In perl I can do something like if (my $var =~ /\s{1}.:\s/) { ...} where I can check the string to see if there is any occurance of space-anyletter-colon-space I am trying to do the same in...
  2. AcidHawk

    Regex question

    Hi, I am having difficulty groking this regex stuff. I have a string: "SomeStuff D: Drive is full" In perl I can do something like if (my $var =~ /\s{1}.:\s/) { ...} where I can check the string to see if there is any occurance of space-anyletter-colon-space I am trying to do the same in...
  3. AcidHawk

    Loading Module using scalar variable

    Thanks, I worked this out about an hour after I had posted the question... guess I just needed to clear my thoughts by putting it into writing. use = compile time require = run time cheers sean ---- Of All the things I've lost in my life it's my mind I miss the most.
  4. AcidHawk

    Loading Module using scalar variable

    Hi I have tried to write 2 different Modules. I want to be able to load either one or both based on an ini file that is read at the start of a perl script. 1) Something like read ini and create the mods array. 2) If the mods array has mod_a,mod_b load both using a foreach statement. So my...
  5. AcidHawk

    ARGV into a $var

    I just put " " around the ARGV stuff and it works.. $var = "@ARGV[2..$#ARGV]"; print $var; Cheers ---- Of All the things I've lost in my life it's my mind I miss the most.
  6. AcidHawk

    ARGV into a $var

    Hi I'm trying to get the 3rd parameter to the last parameter put into a scalar variable. I then want to split the scalar var(no problems here though..) This is not working.. $var = @ARGV[2..$#ARGV]; print $var; If i run this like so.. perl prog.pl useless useless var:i:want:up until this...
  7. AcidHawk

    Access DBD-RAM table from another script

    Hi Where do I start.. I have a database table that I am writing a perl script to update. The requirement is for me to load the table into memory and access it there, then when there are updates, update the in-memory table as well as a flat file and once an hour write those updates from the...
  8. AcidHawk

    CGI basics

    Sorry mate I know nothing about SimpleServer::www I tried your code on Apache 1.3.20 and IIS5 and It worked on both. No Logs does seem wierd though..:) Hope you find help soon! Rgds AcidHawk ---- Of All the things I've lost in my life it's my mind I miss the most.
  9. AcidHawk

    Executing stored procedures from Perl via ODBC

    Hi I don't know about Oracle but with MSsql you can run a stored proc from the command line using osql and the relevant parameters. You can call this from perl using the backticks or exec or even system functions. This enables you to put parameters where you need them.. If the command line...
  10. AcidHawk

    CGI basics

    What Webserver are you using.. can you execute .pl scripts form the /cgi-bin dir setup in your webserver config? does you script start with the #!somepath/perl line? What does your browser return when you run the script? what is in the errorlog of your webserver? Hope these questions help...
  11. AcidHawk

    Auto Refresh based on Checkbox

    Hi I'm trying to auto update a web page every 5 secs based on a check box on a previous page. Here's my code.. PAGE 1 print &quot;<form action=./somescript.pl method=post><center>\n&quot;; print &quot;Enable Auto Update \n&quot;; print &quot;<input type=\&quot;checkbox\&quot...
  12. AcidHawk

    Validate Response from a Chomp

    Do I get a Vote if I fix this myself. This is what I did.. chomp($_ = <STDIN>); if (/^[yn]/i) { if (/^n/i) { print &quot;\nUsage: xPerfCollector <ServerName>\n&quot;; &e; } if (/^y/i) { print &quot;\nI must step thru ALL the servers DIRS\n&quot...
  13. AcidHawk

    Validate Response from a Chomp

    Hi I am trying to validate that the user only enters a (Yy/Nn) this is what i have but it does not work..:( it comes out of a bigger script but the validation is what im having a problem with sub ques_noargs { print &quot;Fetch Performance Data for ALL servers in cube Directory...
  14. AcidHawk

    Compare fields in rows from CSV file

    Are you suggesting that I push $row[3] into another array.. Here is what I have... # Tell Perl we require cgi-lib.pl #require &quot;./cgi-bin/cgi-lib.pl&quot;; $CSV=&quot;C:/mydocs/myweb/occ/tst.csv&quot;; # Create Header for CGI print &quot;Content-type:text/html\n\n&quot;; print...
  15. AcidHawk

    &quot;Content-Type&quot; showing up at top of page

    Try Calling this script from a html page... <HTML> <HEAD><TITLE>Sample</TITLE></HEAD> <BODY> <A HREF=&quot;./path/sample.pl&quot;>Sample Script</A> </BODY> </HTML> I have had this before... If I run the pl script from the browser directly I get the Content-type stuff at the top of my...
  16. AcidHawk

    system command?

    You could try this also... exec `rmtcmd call pgm(library/program) systemname /z` the ` is not a single quote it is a backtick.. to the left of the numeric 1 rgds AcidHawk
  17. AcidHawk

    Compare fields in rows from CSV file

    Hi, I am wanting to find uniqueness in a csv file. Detail: the csv file looks loke this.. DATE,Time,Name,Location 03/03/2001,08:00:00,Server1,DBN 04/03/2001,13:20:13,Server1,DBN 04/03/2001,15:35:00,Server2,CPT 04/03/2001,16:00:16,Server1,JHB etc... I want to do something different if...

Part and Inventory Search

Back
Top