Re: Not matching a dot

2003-03-10 Thread Simon Oliver
Andrew Mansfield wrote: I want to match files that have no period in their filename. if( $_ =~ /[^.]/) { if( $_ !~ /\./) { or unless( /\./ ) { -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http

Re: Module to open port and receive data

2003-03-10 Thread Simon Oliver
blems with forks and threads under Win32 (used to be a problem but I've looked at this since 5.8 was released). Finally, Advanced Perl Programming has a couple of chapters on Networking: http://www.oreilly.com/catalog/advperl/index.html -- Si

Re: Module to open port and receive data

2003-03-10 Thread Simon Oliver
Ricci, Mark wrote: >Is there a perl module that will open a specified port on a server > and receive data on it? Socket, IO::Socket or Net::Telnet -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe

Re: Quirky behavior with for loop

2003-02-11 Thread Simon Oliver
be the cause of your trouble. (hard to tell without seing the data) $columnar_chart_value="value_"."$i"."_"."$inner_counter"."_"."$counter"; At no point do you declare or set $counter. The final

Re: Win32 to UNIX

2002-11-20 Thread Simon Oliver
application is ruled out, perhaps with the exception of Excel (see Spreadsheet::ParseExcel). -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Win32 to UNIX

2002-11-20 Thread Simon Oliver
functions and CPAN modules where possible, avoiding shelling out to the O/S, using Win32::* modules, etc then the port to Solaris could be trivial. You know your code best! -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To

Re: Connecting to an Access DB

2002-10-15 Thread Simon Oliver
kaleb murphy wrote: > > I'm wondering if anyone can point me to the correct > drivers for MSAccess's ODBC drivers. I tried > installing MS's MDAC 2.7, but I still get a "no MS > Access driver found" error. Are the drivers listed in the ODBC administrator? If so they are installed. Let's see y

Re: Insert items to html's list box from MySql table

2002-09-10 Thread Simon Oliver
sn",$uid,$pwd,$attr) or die "Error connecting to datasource '$dsn': $DBI::errstr\n"; my $sql = q{SELECT id, value FROM table ORDER BY 2}; my $sth = $dbh->prepare($sql); $sth->execute; my $html = q{}; while (my $row

Re: Perl for ISAPI

2002-06-28 Thread Simon Oliver
= $ENV{PERLXS} || "Perl"; $server = $ENV{SERVER_SOFTWARE}; $client = $ENV{REMOTE_ADDR}; print << "EOHTML"; HTTP/1.0 200 OK Content-Type: text/html\n $title $title This is $perlxs Version

Re: [Perl-unix-users] Session Timeout in CGI

2002-06-12 Thread Simon Oliver
ut if the system is idle for abt 30 mins. > I guess you are manageing your own sessions via cookies? You need to resend (overwrite) the cookie on each access with a new expiry value of +30M. -- Simon Oliver ___ Perl-Win32-Users mailing list

Re: interpolation question

2002-05-23 Thread Simon Oliver
where CustomerName = ?'; my $name = $db->selectrow_array($sql, undef, $CustomerName); -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Sockets tutorial

2002-05-22 Thread Simon Oliver
Tim Fletcher wrote: > > shurly it isn't that hard to > create a conection to an other IP and send/receive info! > Any help would be very helpful > TIA ;) perldoc IO::Socket::INET Also look at the RPC modules (PlRPC) and Net::Daemon

Re: Perl syntax check without using "perl -c"

2002-05-10 Thread Simon Oliver
, primarily because I'll have to use a temporary file for > : the output > > Try: > > eval $perl_code; > print $@ if $@; > That will run the code too - which might probably not desirable! -- Simon Oliver __

Re: Preferred PERL Editor

2002-05-10 Thread Simon Oliver
ing down SHIFT at the same time highlights the block > within the brackets I didn't know that - thanks for the tip! -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Fw: Hash of Hashes

2002-05-07 Thread Simon Oliver
of the data referenced by $row: while (my $row = $sth->fetchrow_hashref()) { $returned_rows{$row->{'ID'}} = {%$row}; -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Using DBI::ODBC to get primary keys?

2002-05-07 Thread Simon Oliver
"Morse, Richard E." wrote: > > Simon Oliver [mailto:[EMAIL PROTECTED]] wrote: > > > This probably means that the ODBC driver does not support the function > > (GetPrimaryKeys). > > As you noted, a trace reveals that this function isn't supported. If t

Re: Using DBI::ODBC to get primary keys?

2002-05-07 Thread Simon Oliver
s are supported by your driver. I snagged the constants from SQL.H and SQLEXT.H - there may be some missing :( -- Simon Oliver #!perl # # functions.pl, [EMAIL PROTECTED] # lists driver supported ODBC functions # use warnings; use strict; use DBI; my ($dsn, $uid, $pwd) = @ARGV; if (!defined $dsn || $ds

Re: Hash of Hashes

2002-05-07 Thread Simon Oliver
x27;t forget, when it get's multidimensional you can drop the -> notation so it looks multidimensional too: $i_ama_hash_ref->{ima_key2}{"I'm a key"}="I'm a value"; -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: 2 Beginner questions, please help

2002-04-25 Thread Simon Oliver
print "$matched\n" if defined $matched; } Which can be simplified to: while(<>) { print "$1\n" if /(\w*xy\w*)/; } -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: problems selecting when variables are present in statement sql

2002-04-16 Thread Simon Oliver
It's in the DBI man page under "ATTRIBUTES COMMON TO ALL HANDLES". Read the sections titled "LongReadLen" and "LongTruncOk". -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscri

Re: One-liners

2002-03-26 Thread Simon Oliver
> perl -e 'print "Hello World!\n"' > "Can't find string terminator "'" anywhere before EOF at -e line 1." > Question is - How does anyone do substantive one-liners in Windows? perl -e "print qq{Hello World!\n}" -- Simon Ol

OT: Re: lost files

2002-02-08 Thread Simon Oliver
Carl Jolley wrote: > > > Any body have any ideals? > > I kinda like Nelson Mandela. > That would be an idol! -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Connecting to a MS Sql from Unix

2002-02-05 Thread Simon Oliver
DBD::Sybase built against FreeTDS libraries. Amol Natu wrote: > > Hi > > I intend to fetch some data from an MS Sql server DB using perl scripts > residing on a Solaris box. I am currently using doing the same from an > Oracle DB using DBI:Oracle. > What are the alternatives for connecting to M

Re: FW: Slightly OT: How does one get access to PerlScript

2002-01-24 Thread Simon Oliver
lScript in the ActiveState ActivePerl Components docuemntation. -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: FW: Slightly OT: How does one get access to PerlScript

2002-01-24 Thread Simon Oliver
he latest ActivePerl - it puts everything in place. Then just start your asp files with <%@ Language="PerlScript"%> -- Simon Oliver Here's a short example: <%@ Language="PerlScript"%> <% my ($title, $perltype); $title = "Hello PerlSc

Re: Trying to print out tables in mysql db with perl & dbi

2002-01-16 Thread Simon Oliver
> @tables = $dbh->table_info(); @tables = $dbh->tables(); -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: Desktop database options

2001-12-13 Thread Simon Oliver
with an information type of SQL_TIMEDATE_FUNCTIONS. The scalar function NOW( ) has been available since ODBC 1.0. ODBC uses escape sequences for scalar functions. The syntax of this escape sequence is as follows: {fn scalar-function} SELECT * FROM orders WHERE due_date > {fn NOW()} -- S

Re: (no subject)

2001-12-12 Thread Simon Oliver
Does this have anything to do with perl? -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: dynamic dsn's once again.

2001-12-12 Thread Simon Oliver
the DSN on the client (actually you can by installing PerlScript on the client first but there are serious security problems with that - think, instead of creating a DSN I could create files on the client filesystem or delete them). -- Simon Oliver ___ P

Re: killing object/process in 5 sec ,if not completed

2001-12-12 Thread Simon Oliver
? -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: How to delete a line in a file

2001-11-26 Thread Simon Oliver
something like ... open IN, "<$infile" or die $!; open OUT, "<$outfile" or die $!; while () { next if /^subnet/; print OUT; } close OUT; close IN; unlink $infile or die $!; rename $outfile, $infile or die $!; -- Simon Oliver

Re: Cheating file dates

2001-11-22 Thread Simon Oliver
utime perhaps? "Kamphuys, ing. K.G." wrote: > > Hi list members, > > How can I change the file date of a file to a given value? I know Windows > supports that since there are programs that enable you to do so, but how can > I do that in perl? > Preferrably a perl command or module rather than

Re: Time to Garbage Collect Out of Scope Hashes

2001-11-21 Thread Simon Oliver
State 5.6.1 - not standard Perl 5.6.1 (on Unix at least) -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: DBI or Network module??

2001-11-21 Thread Simon Oliver
Steve, I converted you VB to Perl and it works... -- Simon Oliver use strict; use warnings; use Win32::OLE; my $oSQLApp = Win32::OLE->new('SQLDMO.Application'); my $oNames = $oSQLApp->ListAvailableSQLServers(); foreach my $i (1 .. $oNames->Count) { print $oN

Re: Win32::ChangeNotify

2001-11-21 Thread Simon Oliver
Just tried print $^E as well and got: "Error creating Win32::ChangeNotify object: The directory name is invalid at - line 11." So I went and created a directory 'c:\winnt\chdir' and it went well. What does $^E return for you? -- Simon Oliver use strict; require Win32

Re: Win32::ChangeNotify

2001-11-21 Thread Simon Oliver
nt\\chdir"; my $WatchSubTree = 0; my $Events = FILE_NOTIFY_CHANGE_FILE_NAME; my $notify = Win32::ChangeNotify->new($Path,$WatchSubTree,$Events); die "Error creating Win32::ChangeNotify object" unless ref $notify; $notify->reset; $

Re: Time to Garbage Collect Out of Scope Hashes

2001-11-21 Thread Simon Oliver
7;s a Bencmarked script and some results follow. I don't have 5.6.0 on Win32 but I do have 5.6.0 and 5.6.1 on Linux and they give simillar results so this looks like a problem with the ActiveState compile of 5.6.1 not core Perl 5.6.1! -- Simon Oliver use Benchmark; print "Perl: '$

Re: DBI and display tables in a database

2001-11-19 Thread Simon Oliver
There is no reference to such a function in the DBD::ODBC man page. Why not use the DBI method 'tables' of if you need finer granularity use 'table_info' as this will provide a more portable script. -- Simon Oliver ___ Perl-Win3

Tie Array and Hash

2001-10-15 Thread Simon Oliver
lah}; print $obj[0]; I guess this would require the creation of %obj and @obj and tieing thereof. So ... is it possible to tie an object to both a hash and an array at the same time? How? And what's the best way to create and tie the underlying hash

Re: why does @array[$num, $num] have *two* elements?

2001-10-12 Thread Simon Oliver
You are confused. @array[$x,$y] returns and array of the two elements of @array with indexes $x an $y. @array[$x..$y] returns and array of the elements between index $x and $y, includive. -- Simon Oliver Bennett Haselton wrote: > > Presumably affects all versions of perl -- but how c

Re: trying to access nt-variables to include it in html

2001-10-10 Thread Simon Oliver
Just use $ENV{username} within your script. -- Simon Oliver Björn Göhringer wrote: > > we want to include the environment variable "username" in an html page > so we can start different actions depending on which user is logged in > and accesses the page. so when i go t

Re: UserAgents to Amazon

2001-09-28 Thread Simon Oliver
I think the problem was that you were using a POST and amazon was expecting a GET. -- Simon ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: can't load DBI DBD-ODBC Problem

2001-05-10 Thread Simon Oliver
tpub\scripts\databasetest.cgi > line 4. > > Thanking You > Prasad PVK > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users -- Simon Oliver

Re: resetting the cpan install

2001-03-20 Thread Simon Oliver
;` to reinitialize the file. -- Simon Oliver ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: ODBC Questions

2001-03-12 Thread Simon Oliver
Actually, you don't need to create a DSN at all, here's an example for an Access database: $dbq = 'C:\\Program Files\\Microsoft Office\\Office\\Samples\\Northwind.mdb'; $dsn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=$dbq;DefaultDir=C:\temp"; $db = new W

Re: mail "smarthost" module for perl?

2001-02-16 Thread Simon Oliver
Look at the RFC on SMTP - it tells you all the commands you need to know to communicate with an SMTP server. You will also need to do a DNS lookup and check the MX record for the specified mail domain - the MX record will give you the preffered mailhost for the specified domain and that is whe

Re: ADSI and Win2K?

2001-01-26 Thread Simon Oliver
It works for me. I've added a bit of error checking - let me know what the error is: #!perl use strict; use warnings; use Win32::OLE qw(in); my $hostname = $ENV{COMPUTERNAME}; my $username = 'Administrator'; my $user = Win32::OLE->GetObject("WinNT://$hostname/$username,User") or die Win32

Re: Finding a mail module ????

2001-01-11 Thread Simon Oliver
What do you want to do, send or receive mail? What is your application? There are many tools out there but here a some I have used: To send mail look at Mail::Sender ppm install Mail-Sender --location=http://Jenda.Krynicky.cz/perl To receive mail look at Mail::POP3Client ppm install Mail