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 Wanet Telecoms Ltd 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: jollekox
  • Content: Threads
  • Order by date
  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?

    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...
  4. 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
  5. 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...
  6. 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...
  7. 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...
  8. jollekox

    Setting multiple cookies with one cgi script?

    I have seen web pages setting two or more cookies at a time, how can I accomplish to do this? my $cookie = $query->cookie(-name=>'name', -value=>'value', -expires=>'+3d', -domain=>'domain.com'); print $query->header(-cookie=>$cookie); The code above does not seem to allow this? Thanks in...
  9. jollekox

    Inserting table name from scalar in sql prepare?

    Hi! I am currently trying to insert a table name from an scalar into an sql prepare, is this possible in some way? (I am trying to make a multi-user blogging system) The code I am trying to use looks like this: $sth = $dbh->prepare('update ? set header = ? where id = ?'); $execute_result =...

Part and Inventory Search

Back
Top