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...
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...
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.
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...
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...
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...
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?
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.