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 IamaSherpa 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. perlfan

    2's Compliment

    For starters thanks to those who responded. After I posted my question I got more info on the problem at hand. In a nutshell we have multiple computers communicating across an interface. One computer stores integers as signed magnitude (first bit is sign bit remaining bits are powers of two)...
  2. perlfan

    2's Compliment

    I have an integer that needs converting. Basically I need to find it's 2's compliment and then use the first bit as the sign bit. Anybody know a good way to do it?
  3. perlfan

    Learning Python

    HERETIC! Just kidding. I may soon be on a project that uses Python. Please report back with your impressions and observations.
  4. perlfan

    Hash of Lists Problem

    Well, after stepping away fron the problem for a little while and then referring to the bible as written by Larry Wall I happened on a solution. my @hashlist = @{$MsgContents{A}};
  5. perlfan

    Hash of Lists Problem

    I've been struggling with the following code now and am about to scream. Can someone please tell me how to pull a list out of a hash that contains lists? my %MsgContents = ( A => [1, 2, 3], B => [4, 5, 6] ); my $single = $MsgContents{B}[0]; print $single; # prints 4 as expected #my...
  6. perlfan

    Regex needs another set of ii

    I would really appreciate it if you could take a look at the following regexes and let me know if there are any problems, including security issues. Handling URLs has proved to be tricky and I'm concerned I'm too forgiving in what I accept. They are from a bulletin board script where the user...
  7. perlfan

    Stripping Most HTML Tags But Not All

    goBoating No need to apologize. Thanks for the help, I've got a path to go down now.
  8. perlfan

    Stripping Most HTML Tags But Not All

    goBoating Thank you very very much. That is a huge help. I have one question. You use the i qualifier on the substitution. Does it get used? By that I mean the match pattern ($&) is checked for inclusion in the hash $keep_this (shouldn't that be %keep_this?). The hash values are case...
  9. perlfan

    Stripping Most HTML Tags But Not All

    I'm writing a perl cgi application similar to a bulletin board. It's desired the user be able to enter simple html commands for bold text, italics, font formatting, etc. Rather than blindly accepting all html it would be best to accept a subset of innocuous html tags. What is a good way to do...
  10. perlfan

    Recipe for Simple Proxy Check

    Does anyone have a recipe or suggestion for a perl script to check a given IP and port to determine if it is a public proxy?
  11. perlfan

    good code

    mikevh Now that is clever. I thought my if else was a bit clunky but didn't see a way past it. Learned something new, thanks!
  12. perlfan

    good code

    If your list ever grows beyond three the following example could do the trick as long as your assigned variables contain an alphanumeric. Note $var5 is undefined while $var2 is null. $var1 = "a"; $var2 = ""; $var3 = "b"; $var4 = "c"; @mylist =...
  13. perlfan

    Sticky Widget for input type=file

    I'm writing a perl bulletin board CGI script that allows the user to upload image files and display them in their message. They have the option of previewing their post prior to submitting and making changes to the form fields if needed. When they preview the form appears with their original...
  14. perlfan

    onMouseOver event in Layer

    vic Thank you very much. I came to the same conclusion, that being use a function for the event. Rest assured your code will be put to work.
  15. perlfan

    onMouseOver event in Layer

    I'm trying to write a snippet of code that will take a user to another page on my site when they move their mouse over a certain spot. The code below works fine in IE (if you swap the layer tags for div tags), but doesn't work at all in Netscape. Any suggestions or alternatives? <layer...
  16. perlfan

    How To Mark All Messages As Read

    I have a message board that I'd like to add a new feature to. Specifically I would like the user to be able to hit a button and have all messages on the board appear as though they've been read, i.e. change the link color to visited. This needs to hold up the next time they view the page. Is...
  17. perlfan

    Which Module Is Used?

    I'm using CGI.pm on my ISP's server but do not have write privaleges and need to make a few small changes. If I create a copy with the needed changes and put it in a directory, say /mydir/mymodules/, and then add &quot;use lib '/mydir/mymodules/';&quot; in my script will the script use my...

Part and Inventory Search

Back
Top