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 biv343 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: martinasv
  • Content: Threads
  • Order by date
  1. martinasv

    avoiding MySQL error messages being printed out

    Hi! I wrote this little peace of code, which is supposed to check if a certain database exists, and if not, create one. (Maybe there's a much better way to do it, but I don't know it) Anyway, here's the code: use DBI; $username = 'root';$password = '';$database = 'tina'; $hostname = ''; if...
  2. martinasv

    creating mysql database from perl

    Hi, everyone! Is there a way to create a database using Perl? I've been searching the Net, and all examples I came across were for connecting to an existing database. I tried using: $result=$dbh->createdb("dbname"), but it returns an error: Can't call method createdb on an undefined value...
  3. martinasv

    yum installer and DBI

    Hi, everyone! I was wondering... If I write: # yum install mysql ... # yum install mysql-server ... Is DBI installed together with those, or do I have to install it separately? Tnx.
  4. martinasv

    stopping script execution

    Hello guys and gals! I have a perl script which captures ARP packets on the network. Right now I'm starting it from command-line and stopping it with Ctrl-C. But, I'd like to start it and stop it from perl/CGI stript (HTML page, Start and Stop buttons). I know I could start it using...
  5. martinasv

    regexp

    Hi! This is one of the lines I get when I use nbtscan to detect computers' NetBIOS name: 192.153.1.5 STARI <server> STARI 00-c0-df-13-66-49 I'd like to parse that line in such way that I store IP address to variable $ip and NetBIOS name "STARI" to variable $nbt...
  6. martinasv

    two submit buttons in one form

    Hi! If I have two submit buttons in one form (like shown below), how do I get the "name" part in a variable to be able to use it with "if" statement? print "<br>"; print "<form>"; print "<input type=submit name=update value=\"Write NIC name\" >"; print "<font align=middle>OR</font>"; print...
  7. martinasv

    html form, action pointing to a subroutine?

    Is it possible to write HTML form in perl so that the action points to a subroutine in the same script? E.g. print "<form action=\"do_something()\">"; where do_something is a subroutine?
  8. martinasv

    CGI submit form and mysql

    Hi! I have a problem (again). :-( This script I wrote is supposed to update mysql table with new data. When I write in mysql: update table set nameMAC='something' where MAC='something else', everything works just fine. But my script just won't do it! Here's my code, so if anyone can figure...
  9. martinasv

    malformed header from script

    Hello! I have a strange thing going on. This is my perl code: ______________________________________ #! /usr/bin/perl use CGI; use DBI; print "Content-type: text/html\n\n"; print "<HTML><HEAD><meta http-equiv=Content-Type content=text/html; charset=iso-8859-2><TITLE> Adding a NIC card...
  10. martinasv

    perl and nbtscan

    Hi. I'm supposed to scan the network, find out NETbios computer names and store them in a database. I know there are tools like nmap and nbtscan. I tried nmap from command line and it shows everything BUT computer names. Nbtscan works perfectly from command line, but I don't know how to start...
  11. martinasv

    problem with html links in perl (+mysql)

    Hi, everyone! I wrote a perl script which extracts data from mysql table and prints those data to html table. Those data include MAC, IP addresses, dates, times, etc. Now, what I did next was - I turned each MAC address into a link, like this: while($Row=$Select->fetchrow_hashref) { print...
  12. martinasv

    perl, mysql and html links

    Hi, everyone! I wrote a perl script which extracts data from mysql table and prints those data to html table. Those data include MAC, IP addresses, dates, times, etc. Now, what I did next was - I turned each MAC address into a link, like this: while($Row=$Select->fetchrow_hashref) { print...

Part and Inventory Search

Back
Top