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 SkipVought 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: spewn
  • Order by date
  1. spewn

    after session expires, it's empty and i can't initialize a new session...

    here's my code: use CGI::Session; $session = CGI::Session->load(); if ($session->is_empty) { #print $session->header(); #print "your session is empty"; $session = $session->new(); } $sSid = $session->id(); everything is fine the first go around, but it seems as though there is a default...
  2. spewn

    question about constants, db pulls and sessions...my site seems to be crashing...

    ok. i already knew that i write horrible, non-efficient code...that being said, i need to figure out something. i use this to store db information and call it later down the line to use that stored info: $query1="SELECT value1, value2 from mytable WHERE conditionX = '100' limit 1"; $sth1 =...
  3. spewn

    reading an xml file with GGI::Simple, with nested name/value pairs...

    here's an example: <?xml version="1.0"?> <RaceListResponse> <AccountType>User</AccountType> <AccountStatus>Enabled</AccountStatus> <RaceInfo> <RaceItem> <RaceLocation>98</RaceLocation> <RaceTime>10</RaceTime> <NumberOfRacers>24</NumberOfRacers> <RaceStops> <FoodItem>...
  4. spewn

    how to pull name value pairs from an array variable...

    Yes. Exactly. I actually came up with this last night: foreach $v (@{$variable1}) { $rtime=$v->{RaceTime}; $rnumber =$v->{RaceNumber}; $rid=$v->{RaceID}; #html code here } it works, but i do like your example, as it allows for new keyvalue pairs without having to update code...
  5. spewn

    how to pull name value pairs from an array variable...

    i have this variable to work with, below is an example (but correct syntax) or the information carried by the variable. $variable1 = [ { 'RaceTime' => '15', 'RaceNumber' => '15126', 'RaceID' => '84ee45s89' }, { 'RaceTime' => '15', 'RaceNumber' => '15126', 'RaceID' => '84ee45s89' }, {...
  6. spewn

    trying to read mail using net::pop3...sees message, but fails to read

    hello! here's my code: $pop = Net::POP3->new( "pop.myserver.com" ) or die "Can't connect to pop.myserver.com: $!\n"; $username='myaccount@email.com'; $password='test2pass'; defined ($pop->login($username, $password)); defined ($pop->login()); %undeleted = $pop->list(); foreach $msgnum...
  7. spewn

    solid color but see through gif...need for drop down menu background

    hello. i have a dropdown menu on my nav bar. i want to create a background image for it, so when i appears and drops down i can still *kinda* see the website behind the sub nav contents. i can already put an image in the background, so that part is done. what i'm trying to do is create aa...
  8. spewn

    sql query to check for dupes...got it working, but not exact...

    here's the code: $passedvariable='whatevernextinloop'; $sth = $dbh->prepare("SELECT uniqueid FROM my_table WHERE infofield1 = '$passedvariable'"); $sth->execute; $count = $sth->rows; if ($count > 0) {$dupeleadcount++;$dispo='dupe';} else {$loadtotalcount++;$dispo='';} The...
  9. spewn

    not sure which forum: VPS or dedicated server for sites...help!

    i am moving a friends site from one company to another and he's been offered a much higher performing system if willing to go vps. he's currently on a dedicated server. i don't understand the differences, but here's what i do understand: a virtual private server is a way to turn a server into...
  10. spewn

    .htaccess - passing the request_uri to perl script...

    i have a site that is getting page 404's because a bad url is trying to be accessed. i'm tasked with finding the page that is trying to be requested. i tried to do this right from the perl file that 404's get redirected to, but it seems that the environmental variables are being "lost" in the...
  11. spewn

    need good module to access and parse it into date, subject, etc...

    I've been looking around for different ways to access my mailbox using perl. i'm going to display the contents on a page, etc, so i need to break it down like a regular email viewer. Here's a few I'm looking at if anyone could offer suggestions, experience. Net::IMAP::Simple; Mail::POP3Client...
  12. spewn

    i have vs2005 professional...can i create relevant applications?

    i wanted to build a full program that utilizes a db, and can be distributed to end users. i bought the vs2005 when it was new, and started in on my task, but got sidetracked. i'm now back to the original idea, and don't know if what i have is sufficient. if someone could let me know the...
  13. spewn

    need most efficient way to write this code that checks zips...

    i have a file with a zip code on each line. my script pulls a user's information, including a field that includes a zip code, as well as other elements of an address ($addrField). i need to compare the zip code from that field against each zip code in the file, and note if it matches. i also...
  14. spewn

    how to return results for an age range in sql?

    i have a query i'm running, for people who are between 18 - 24 years old. here's what i have: $sth = $dbh->prepare("select * from dbtable where (((TODAYSDATE - uDOB) > 18)&&((TODAYSDATE - uDOB) < 25))"); where TODAYSDATE is a mysql function, and uDOB is my field that stores a the date of...
  15. spewn

    search and replace a | for a +

    here's the string i have: $sn='Males, 18| Years Old'; $sx =~ s/|/+/g; Need to have it as: $sn='Males, 18+ Years Old'; But my search/replace code isn't working. Any ideas? - g
  16. spewn

    using Mail::POP3Client to pull mail from GMail...

    i have this script: use Mail::POP3Client; use IO::Socket::SSL; use CGI qw(:standard); $cgi = new CGI; $username = 'myemailaddress@gmail.com'; $password = 'mypassword'; $mailhost = 'pop.gmail.com'; $port = '995'; print $cgi->header(); $pop = new Mail::POP3Client( USER =>...
  17. spewn

    trying to create a tab delimited entry, 1 line at a time...

    i have this info: $string="123456,smith-john,11.10,april payment,USD|123499,jones-mike,40.99,april payment,USD|123994,jackson-sam,44.11,april payment,USD"; and i'd like to save into a file as: 123456 smith-john 11.10 april payment USD 123499 jones-mike 40.99 april...
  18. spewn

    Encryption with SHA-1...did i do correctly?

    i'm trying to encrypt and email using SHA-1. here's my code: #!/usr/bin/perl use CGI qw(:standard); use Digest::SHA1 qw(sha1_hex); $cgi = new CGI; $x='test@mail.com'; $epassnew=sha1_hex($x); print $cgi->header(); print $epassnew; this definitely gives me a value, that appears encrypted...
  19. spewn

    see how many times a string is matched within a paragraph...

    i have an array of sorts: $listarray='4857|4/8/2009,9568|4/9/2009,2368|4/10/2009,3746|4/12/2009,4987|4/15/2009,7283|4/16/2009,7428|4/18/2009,4993|4/19/2009,9968|4/19/2009,9968|4/19/2009,9968|4/19/2009'; i'm trying to see if a certain element is repeated in $listarray, as i'm cycling through...
  20. spewn

    can't create a new connection to use my ethernet port for internet

    hello. i loaded win2k on my box, and besides it being outdated, i can't seem to get my cable modem to work. i've plugged the modem into my laptop, no problem, works great, so i know it's not that. but on the desktop, i started windows, went through the "internet connection wizard", did the...

Part and Inventory Search

Back
Top