Re: Problem while connecting with Mysql

2005-12-26 Thread Mazhar
Hi Rakesh, Try the below code which may solve the problem.. $mysql_db_host = "xxx.xxx.xxx.xxx"; (Enter the IP Address) $mysql_db_port = "3306"; (Enter the port no) $mysql_db_user = ""; (enter the mysql username) $mysql_db_pass = "";(enter the password) $dbh = DBI->connect("DB

Problem while connecting with Mysql

2005-12-26 Thread Rakesh Mishra
Hi I am trying to connect with mysql code: - #! /usr/bin/perl -w use warnings; use DBI; my $host ="xyz"; my $user ="user"; my $pass ="mysql"; my $db_name ="test"; $dsn ="DBI:mysql:database=$db_name;host=$host"; $dbh = DBI->connect($dsn,$user,$pass) or die "Cannot able to connect: $!\n"; error

Re: How to check for a file already opened

2005-12-26 Thread reader
"John W. Krahn" <[EMAIL PROTECTED]> writes: > John W. Krahn wrote: >> Well, let's see what each one does: Nice examples... thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: file :: find problem

2005-12-26 Thread Charles K. Clarkson
Manoj Thakkar, Noida wrote: : "Can't cd to (C:/) System Volume Information: Permission denied" : : here is my code Add: use strict; : use warnings; : use File::find; : : sub wanted : ( : if (/albd_server/) You have a syntax error here. An 'if' statement re

RE: Write to file handle

2005-12-26 Thread Timothy Johnson
I haven't used it in a while, but here is some code I used to use with Win32::SerialPort. It may give you an idea of what you can do. This is not very efficient code, but it works. In my case there wasn't a whole lot of data coming through, so I just opened the file each time I needed to write t

not valid win32 app

2005-12-26 Thread John W. Burns
For some inexplicable reason (at least to me) my windows perl application has ceased to load. When I call perl\bin\perl.exe I receive the message "not a valid win32 application." OS is Windows XP. I have never had this problem in the past. I re-installed Perl from Active State and still receive t

file :: find problem

2005-12-26 Thread Manoj Thakkar, Noida
Hi, I have writtena simple file find perl script but i am getting the following problem "Can't cd to (C:/) System Volume Information: Permission denied" here is my code use warnings; use File::find; sub wanted ( if (/albd_server/) print "$File:Find:name; ) find(\&wanted, "c:\\" i have

Re: for send an email

2005-12-26 Thread tee
Sometimes your responses just crack me up, Chris ! Chris Devers wrote: On Sat, 24 Dec 2005, Rafael Morales wrote: I need to send an email to some clients, so I need to know if their mail client can accept html format or just text format. How can know that ???, I think that there is, some

GD::Help + Image::Magick+Linear fit

2005-12-26 Thread S Khadar
Dear Zentara and all others, I tried all the options from GD modules and in my case its not working. I think my case is a bit different, what I need to do is to develop a web interface which accpets some *foo.dat* file and plot the results after some n calculations on to a graph with an already id

Svar: RE: sorting hash

2005-12-26 Thread Anders Stegmann
Thanks for replying! I think I tried everything but that! Anders. Anders Stegmann Ph.d. student Royal Veterinary and Agricultural University Institute of Food Science Section of Food Microbiology Rolighedsvej 30 Building 2-74 Room R074 DK-1958 Frederiksberg C Tlf. +45 35 28 31 58 >>> "Charles

RE: sorting hash

2005-12-26 Thread Charles K. Clarkson
Anders Stegmann wrote: : How do I do that? Use 'sort'. use strict; use warnings; my %hash = qw(1 A 2 B 3 C); foreach my $key ( sort { $a <=> $b } keys %hash ) { print "$key => $hash{$key}\n"; } __END__ The big question is: Are you using the right data

Re: sorting hash

2005-12-26 Thread John Doe
Anders Stegmann am Montag, 26. Dezember 2005 15.22: > Hi! Hello > I have a script like: > > %hash = qw(1 A 2 B 3 C); > while (($key, $value) = each %hash) { > print "$key => $value\n"; > } > > it prints out: > > 1 => A > 3 => C > 2 => B > > I want it to print out a sorted hash like: > > 1 =

sorting hash

2005-12-26 Thread Anders Stegmann
Hi! I have a script like: %hash = qw(1 A 2 B 3 C); while (($key, $value) = each %hash) { print "$key => $value\n"; } it prints out: 1 => A 3 => C 2 => B I want it to print out a sorted hash like: 1 => A 2 => B 3 => C How do I do that? Regards Anders. Anders Stegmann Ph.d. stud