Re: Retrieve data via DBI and write into a file

2008-11-09 Thread Lauri Nikkinen
Thanks Rob and Jeff, this works: ## #!/bin/perl use warnings; use strict; use DBI; my $dbs = "dbi:ODBC:DRIVER={servername};SERVER={serverip}"; my ($username, $password) = ('username', 'passwd'); my $dbh = DBI->connect($dbs, $username, $password) or die "Can'

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-09 Thread John W. Krahn
JC Janos wrote: Hi, Hello, I have a file containing IP addresses & ranges, their negations, and comments. E.g., 1.1.1.1 # comment A 2.2.2.2/29 # comment B !3.3.3.3 # comment C !4.4.4.4/28 # comment D I need to extract those IPs & ranges, rearrang

Re: Connecting MS SQL from linux

2008-11-09 Thread Eko Budiharto
or yon can try DBD::ODBC (http://cpan.uwinnipeg.ca/htdocs/DBD-ODBC/DBD/ODBC.html). On Sun, Nov 9, 2008 at 5:19 PM, Ow Mun Heng <[EMAIL PROTECTED]> wrote: > > > -Original Message- > From: Jeff Pang [mailto:[EMAIL PROTECTED] >>> De : "[EMAIL PROTECTED]" >>> I'm using perl to connect to mysql

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-09 Thread Telemachus
On Sun Nov 09 2008 @ 1:31, JC Janos wrote: > I've read that Perl (which I don't know yet at all) is "best" for Text > processing like this. > > The thing is that I need to do this from within a Bash script, and > assign the comma-separated list to a variable in that Bash script. > > Can I even

RE: Connecting MS SQL from linux

2008-11-09 Thread Ow Mun Heng
-Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] >> De : "[EMAIL PROTECTED]" >> I'm using perl to connect to mysql, but now i need it to connect to MS >> SQL server and after google search i still don't understand the best >> way to do it. >> >Try Class::DBI::MSSQL or UnixOD

Using perl in a Bash-script to extract IP-addresses?

2008-11-09 Thread JC Janos
Hi, I have a file containing IP addresses & ranges, their negations, and comments. E.g., 1.1.1.1 # comment A 2.2.2.2/29 # comment B !3.3.3.3 # comment C !4.4.4.4/28 # comment D I need to extract those IPs & ranges, rearrange them into a comma-separate

RE: Cron environment for execution of Perl script

2008-11-09 Thread Wagner, David --- Senior Programmer Analyst --- WGO
> -Original Message- > From: Telemachus [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 08, 2008 6:13 AM > To: beginners@perl.org > Subject: Re: Cron environment for execution of Perl script > > On Thu Nov 06 2008 @ 3:42, Wagner, David --- Senior > Programmer Analyst --- WGO wrote:

RE: Cron environment for execution of Perl script

2008-11-09 Thread Wagner, David --- Senior Programmer Analyst --- WGO
> -Original Message- > From: Chas. Owens [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 08, 2008 10:14 AM > To: Wagner, David --- Senior Programmer Analyst --- WGO > Cc: Perl Beginners > Subject: Re: Cron environment for execution of Perl script > > On Thu, Nov 6, 2008 at 16:42, Wag