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

  1. jollekox

    DBI problem - populating array of hashes with fetchrow_hashref

    Hi! I'm currently working on some kind of blogging technology for my website, and I'm having problems with a multidimensional data-structure used in a function to parse templates and output pages. All data in the program is stored in an anonymous hash "bound" to a scalar ( my $self = {}; (yes...
  2. jollekox

    CSS: positioning image in lower right corner, scrollbar trouble.

    Hi, it seems like most browsers won't keep a picture set with an id selector to the lower right corner of the screen (absolute positioning, bottom and right is set to 0px) in place if the page has a scrollbar. When I scroll, the picture "sticks" where it was placed on load. Is there a way to...
  3. jollekox

    Clear two text fields upon pressing submit button?

    What does the return false do? Not much, in my opinion, IE has a lack of support to loading functions from another IFRAME, as I tried, tonight. Now, I'm really greatful, and I'm gonna get drunk, so, good night. End of conversation.
  4. jollekox

    Clear two text fields upon pressing submit button?

    I'm awfully sorry, I didn't see that it wasn't a regular submit button in your example. Thanks a lot for your help.
  5. jollekox

    Clear two text fields upon pressing submit button?

    Thanks for a swift reply! Well, it works, but it clears all fields before the form is sent, wich is a bit bad. a one second time delay would probarbly fix that. The downside, I really don't know that much Javascrip. How I send the form without reloading? In the form tag i put target="name" to...
  6. jollekox

    Clear two text fields upon pressing submit button?

    I have created a perl/cgi script that loads into an iframe on my webpage, displaying text taken from a mysql database. As the form for input of data into the database is on the page that holds the iframe, the text sticks in the fields after the submit button is pressed. If anyone would help me...
  7. jollekox

    Run Perl from CD

    [StorG4:/cdrom/] jas% ./your_program.plx That one should work nicely. Exactly what do you mean? Like, auto-run on Windows?
  8. jollekox

    Identifying variable type

    Hi, I am trying to run some lines of code, if a scalar is an float, and not if it is an integer. Currently, I am trying to do this: if ( $pages =~ /./ ) { # do something here } But this does not work, any suggestions for a fix? Thanks in advance! Best Regards, Jollekox
  9. jollekox

    Telnet to Device

    One line of output? Then that should be getline? I would have dropped the sleep(300) on the example I posted, and just turned the timeout up really high, so it would just listen until it gets something. It might be an ugly fix, but, well well....
  10. jollekox

    Please help with function

    I think you should try this one in the JavaScript forum, as it is a very long distance between Perl and JavaScript. Good luck...
  11. jollekox

    Telnet to Device

    Well, I'm spamming away here, but anyway: $x = 0; while ($x == 1) { @lines = $instant->getlines([Timeout => 180], [All => 3]); #something that stores @lines somewhere. sleep(300); } This might get you started, I don't know which of...
  12. jollekox

    Telnet to Device

    And I don't think you should go for an infinite loop as it will possibly hog the system a lot. I'd go for reading maybe a few thousand lines, then storing them. Is it possible to run the Perl script as a cron job (assuming you work on some kind of unix), if the time intervals between each info...
  13. jollekox

    Telnet to Device

    You might want to check out the documentation for Net::Telnet on CPAN: http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm The dump_log, get, get_line and get_lines methods on the page referred to above might work, I think. I have only been playing around with Net::FTP Good Luck!
  14. jollekox

    Regex to substitute newlines, it works, but not like I want it to

    Well, I am running Mac OS X, and it works great here, but on my webhost, the output looks like the first example I posted. But I have had some small problems with Perl on that host before, so it is probably just that (like, I tried to do math on 2 different macs running two different versions...
  15. jollekox

    Regex to substitute newlines, it works, but not like I want it to

    I have a little Perl script that goes something like this: #!/usr/bin/perl -w $lkd = "line one\nline two\nline three"; $lkd =~ s/\n/<br>/g; print "$lkd"; And it outputs something like this: line one <br>line two <br>line tree <br> I thought s/\n/<br>/g; would swap all the newlines with...
  16. jollekox

    Calculating number of pages from number of entries

    I didn't quite get that one to work, but at this point, I am using this one: $pages = $entries / 15; unless ($pages !~ /./) { $pages = int($pages); $pages ++; } Thanks for your help!
  17. jollekox

    Calculating number of pages from number of entries

    I have 47 entries of text in an SQL database, in Perl, I want to print out the last 15 of these (this is simple, I manage to do this), but I also want to print out how many pages these 47 entries would "occupy", if each page displays 15 entries. I could do something like this: $entries = 47...
  18. jollekox

    &quot;Can't locate object method &quot;new&quot; via package&quot;

    Wow! It works! Thanks a lot for your help! ;)
  19. jollekox

    &quot;Can't locate object method &quot;new&quot; via package&quot;

    Hi, I have decided to pick up object-oriented perl programming, and I feel fascinated by packages. Although, when I run the script below, I only get: Can't locate object method &quot;new&quot; via package &quot;Packet&quot; at /Users/jas/Desktop/oop.pl line 9, <STDIN> line 1. I can't make out...
  20. jollekox

    Perl uses?

    I started out with these two books: Learning Perl, 3rd Edition ISBN: 0-596-00132-0 Perl in a Nutshell, 2nd Edition ISBN: 0-596-00241-6 I don`t know if they are the best for you, but I am satisfied. (I use the last one almost every day, maybe becouse I have a bad memory ;) )...

Part and Inventory Search

Back
Top