RE: Can't Locate Perl in Registered File Lists

2002-05-16 Thread Todd_Hemsell

How to make .pl files open in Notepad when double clicked yet maintain
current icon.

(Win2k OS)

Open My Computer.
Tools  Folder Options
click the File Associations tab.
Select .pl
Click advanced.
Click New
Type Edit (or foo for that matter) in the Action textbox
Click Browse
Find app of your choice (I navigated to C:\WINNT\notepad.exe) and select it.
Click OK
Select the new Edit Command
Click the button Set Default
click OK
Click Close


Using this method you will retain the original run command that the Perl
installer created along with the original icon, yet have a different default
behavior when it is double clicked.

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Can't Locate Perl in Registered File Lists

2002-05-16 Thread Burak Gürsoy

adding a new command named NOTEPAD is better IMO

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, May 16, 2002 3:51 PM
To: [EMAIL PROTECTED]
Subject: RE: Can't Locate Perl in Registered File Lists


How to make .pl files open in Notepad when double clicked yet maintain
current icon.

(Win2k OS)

Open My Computer.
Tools  Folder Options
click the File Associations tab.
Select .pl
Click advanced.
Click New
Type Edit (or foo for that matter) in the Action textbox
Click Browse
Find app of your choice (I navigated to C:\WINNT\notepad.exe) and select it.
Click OK
Select the new Edit Command
Click the button Set Default
click OK
Click Close


Using this method you will retain the original run command that the Perl
installer created along with the original icon, yet have a different default
behavior when it is double clicked.

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Using qw(....) on data from database.

2002-05-16 Thread barons

I'm using.

while(($nums) = $sth-fetchrow_array) {

print $nums;
}

This will give me 01 02 03 04

I want to push this into an array.

push @nums, $nums;

But I want the result of 

@nums = qw(01 02 03 04);
The same as:
@nums = ('01', '02', '03', '04');

How do I get this? I have tried and I know this is wrong

push qw(@nums), $nums; # This of course errors.

I think you get what i'm trying to do.
Thanks in advance.
Allan
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Using qw(....) on data from database.

2002-05-16 Thread Johan Lindstrom

At 12:14 2002-05-16 -0400, [EMAIL PROTECTED] wrote:
This will give me 01 02 03 04

I want to push this into an array.

push @nums, $nums;

If you only want numbers:
push(@nums, split(/\D+/, $nums);
i.e. split on one or more chars that are not numbers (\d is any number, 
\D is the opposite).

or, if you want anything separated by whitespace:
push(@nums, split(/\s+/, $nums);


Here is TFM with more info:
C:\ perldoc -f split
C:\ perldoc perlre


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: HowStuffWorks - Learn how Everything Works!
http://www.howstuffworks.com/
dmoz (1 of 9): /Science/Educational_Resources


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Using qw(....) on data from database.

2002-05-16 Thread Johan Lindstrom

At 18:28 2002-05-16 +0200, Johan Lindstrom wrote:
If you only want numbers:
push(@nums, split(/\D+/, $nums);

Add a ) for syntactic completeness :)


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: HowStuffWorks - Learn how Everything Works!
http://www.howstuffworks.com/
dmoz (1 of 9): /Science/Educational_Resources


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



connecting via perl to mysql on another windows 2000 box -

2002-05-16 Thread Norris, Joseph

group,

Here is the situation.  I have to connect to Mysql running on another
windows 2000 box.  I have never done this before. Do I set this up in the
tables as another
host and use the -h parm in command shell and the host parm in my perl
scripts? or is there another way to do it?

Any help would be appreciated - I am of unix background trying to swim in
the windows pool.

Thanks.

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Using qw(....) on data from database.

2002-05-16 Thread Thomas_M

I think what you want is 

  push @nums, qw($nums);


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, May 16, 2002 12:15 PM
 To: [EMAIL PROTECTED]
 Subject: Using qw() on data from database.
 
 
 I'm using.
 
 while(($nums) = $sth-fetchrow_array) {
 
 print $nums;
 }
 
 This will give me 01 02 03 04
 
 I want to push this into an array.
 
 push @nums, $nums;
 
 But I want the result of 
 
 @nums = qw(01 02 03 04);
 The same as:
 @nums = ('01', '02', '03', '04');
 
 How do I get this? I have tried and I know this is wrong
 
 push qw(@nums), $nums; # This of course errors.
 
 I think you get what i'm trying to do.
 Thanks in advance.
 Allan
 ___
 Perl-Win32-Users mailing list 
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: More or Pager function is Perl

2002-05-16 Thread Dirk Bremer \(NISC\)

 I'm output a massive list to STDOUT but wish to break it like the MORE
 function in DOS.  For instance I have a huge array and for each row the
 array I'm outputting to STDOUT.  But when the output reaches the end of
the
 page, I would like to pause it.  What's the best way to do this?

 thanks
 Chuck

Chuck,

This is what I use in a program that mimics the Unix head command:

# After you have displayed a line, assuming that $Displayed
equals zero at
# the start of the script:

$Displayed++;

# Prompt the user each time after a block of 45 lines has been
displayed.
if (($Displayed % 45) == 0)
{
print(STDERR 'Return to continue with this file...');
$Prompt = STDIN;
last if (length($Prompt)  1);
}


Dirk Bremer - Systems Programmer II - ESS/AMS  - NISC St. Peters
636-922-9158 ext. 8652 fax 636-447-4471

[EMAIL PROTECTED]
www.nisc.cc

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Creating a Timeline

2002-05-16 Thread Brian Gibson

I need to generate a Timeline on a web page dynamically.  I have heard 
inklings about HTML::Timeline but what is the easiest way ( either with 
Perl or without )
that someone has experienced doing this?  I can't seem to find much on 
this module.

-- 
Thanks,

Brian Gibson
Systems Administrator
Wheaton College
508-286-3417
[EMAIL PROTECTED]


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Creating a Timeline

2002-05-16 Thread Mark Pryor

Hi Brian,

 I need to generate a Timeline on a web page dynamically.  I have heard 
 inklings about HTML::Timeline but what is the easiest way ( either with 
 Perl or without )
 that someone has experienced doing this?  I can't seem to find much on 
 this module.

You might have to go to CPAN for it, I got the no PPD error message from
the ActiveState PPM depository, using Perl 5.6.1.

You can try my Perl CGI approach. There might be some bugs on IE5.5, but
it works nicely on IE5.0 or less.
http://home.sprintmail.com/~mpryor/makeTL.htm

I put up this page almost a year ago, but there have been no requests for
support with the script. See if its anywhere close to what you need.

good luck,
Mark Pryor
 
 -- 
 Thanks,
 
 Brian Gibson
 Systems Administrator
 Wheaton College
 508-286-3417
 [EMAIL PROTECTED]
 
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Using qw(....) on data from database.

2002-05-16 Thread Thomas R Wyant_III


_I_ think you need

@nums = split '\s+', $nums;

If you do

push @nums, qw{$nums};

the list ends up containing ('$nums'), because qw is _not_
double-quotish.

Tom Wyant




[EMAIL PROTECTED]@listserv.ActiveState.com on 05/16/2002 12:14:51 PM

Sent by:[EMAIL PROTECTED]


To:[EMAIL PROTECTED]
cc:
Subject:Using qw() on data from database.


I'm using.

while(($nums) = $sth-fetchrow_array) {

print $nums;
}

This will give me 01 02 03 04

I want to push this into an array.

push @nums, $nums;

But I want the result of

@nums = qw(01 02 03 04);
The same as:
@nums = ('01', '02', '03', '04');

How do I get this? I have tried and I know this is wrong

push qw(@nums), $nums; # This of course errors.

I think you get what i'm trying to do.
Thanks in advance.
Allan
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



perldoc in tk window?

2002-05-16 Thread Bob Davis

Is there a command to have perldoc command display in a text window? An 
option off of perldoc -tk.

bob

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



OT Q: Internet Information Server mailing list

2002-05-16 Thread Moulder, Glen

Hi all,

Sorry for the OT post, but google didn't turn up anything.  I've got a complex perl 
CGI app running that works very well on our intranet, *except* that it only works 
correctly if the user logs in as an admin.  A normal user can run the script in the 
browser but none of the .GIFs or .JPGs on the pages are displayed.  Access to data 
files shown in tables on the pages works exactly the same way as retrieving the 
images, so I'm stumped as to why the images won't display.  Have spent the past few 
hours monkeying around with IIS perms - at one point, couldn't access the app at all.  
Have now restored it to original functionality.  Asking the Q here because we don't 
have access to newsgroups due to security restrictions, looking for a good mail list 
(or some IIS pointers).  Any ideas?

Glen
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



GUI and Documentation Q's

2002-05-16 Thread George Gallen
Title: GUI and Documentation Q's





I'm used to PERL on unix, and am now starting to do some work on Windows.


q1. How do you do GUI, if the perlcode runs in a Dos Window?
q2. Recommend some sites on implements GUI with Win32 modules and 
 documentation on it's functions?


I'm currently running 5.6.0 Active State Perl on W98.


Thanks


George Gallen
Senior Programmer/Analyst
Accounting/Data Division
[EMAIL PROTECTED]
ph:856.848.1000 Ext 220


SLACK Incorporated - An innovative information, education and management company
http://www.slackinc.com





Re: Internet Information Server mailing list

2002-05-16 Thread Mark G. Franz

I know IIS pretty well... permissions are always an item of discussion when
new apps or virtual directories get implemented.  And it is really quite
simple once you think about it.

When IIS is installed, an IUSER_XYZ, (XYZ is the server name) account is
created, this account is basically the Anonymous user.  This user has access
to all pages and directories, apps and files associated under the WebRoot.
If the Parent directory has IUSER access, then the Sub-Directories will
inherit these permissions unless you modified the Security Template, to
restrict permissions, just open the IIS MMC, Set the appropriate permissions
on the files or directories for whatever user you want to allow or restrict.

Sorry I do not know of any good IIS News groups, but I'm sure there out
there...  Check out www.experts-exchange.com, I like the set-up there.

Mark
- Original Message -
From: Moulder, Glen [EMAIL PROTECTED]
To: perl-win32-users [EMAIL PROTECTED]
Sent: Thursday, May 16, 2002 1:07 PM
Subject: OT Q: Internet Information Server mailing list


 Hi all,

 Sorry for the OT post, but google didn't turn up anything.  I've got a
complex perl CGI app running that works very well on our intranet, *except*
that it only works correctly if the user logs in as an admin.  A normal user
can run the script in the browser but none of the .GIFs or .JPGs on the
pages are displayed.  Access to data files shown in tables on the pages
works exactly the same way as retrieving the images, so I'm stumped as to
why the images won't display.  Have spent the past few hours monkeying
around with IIS perms - at one point, couldn't access the app at all.  Have
now restored it to original functionality.  Asking the Q here because we
don't have access to newsgroups due to security restrictions, looking for a
good mail list (or some IIS pointers).  Any ideas?

 Glen
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: GUI and Documentation Q's

2002-05-16 Thread Johan Lindstrom

At 16:22 2002-05-16 -0400, George Gallen wrote:
q1. How do you do GUI, if the perlcode runs in a Dos Window?
q2. Recommend some sites on implements GUI with Win32 modules and
  documentation on it's functions?

A deja vurl for you:

(GUI) Windows Programming FAQ
http://www.perlmonks.org/index.pl?node_id=108708


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: HowStuffWorks - Learn how Everything Works!
http://www.howstuffworks.com/
dmoz (1 of 9): /Science/Educational_Resources


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: connecting via perl to mysql on another windows 2000 box -

2002-05-16 Thread Ron Grabowski

 Here is the situation.  I have to connect to Mysql running on another
 windows 2000 box.  I have never done this before. Do I set this up in the
 tables as another
 host and use the -h parm in command shell and the host parm in my perl
 scripts? or is there another way to do it?

What happens when you simple tell the script the machine name of where
the mysql server resides as per the DBI documentation:

---
  DBI Class Methods

The following methods are provided by the DBI class:

connect
  $dbh = DBI-connect($data_source, $username, $password)
or die $DBI::errstr;
  $dbh = DBI-connect($data_source, $username, $password,
\%attr)
or die $DBI::errstr;

[snip]

Examples of $data_source values are:

  dbi:DriverName:database_name
  dbi:DriverName:database_name@hostname:port
  dbi:DriverName:database=database_name;host=hostname;port=port
---
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: OT Q: Internet Information Server mailing list

2002-05-16 Thread Allegakoen, Justin Devanandan

Glen,

I had this problem, what I did was to put the image files in a share drive
that everybody has access to.

HTH

Just in

-Original Message-
From: Moulder, Glen [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 4:07 AM
To: perl-win32-users
Subject: OT Q: Internet Information Server mailing list


Hi all,

Sorry for the OT post, but google didn't turn up anything.  I've got a
complex perl CGI app running that works very well on our intranet, *except*
that it only works correctly if the user logs in as an admin.  A normal user
can run the script in the browser but none of the .GIFs or .JPGs on the
pages are displayed.  Access to data files shown in tables on the pages
works exactly the same way as retrieving the images, so I'm stumped as to
why the images won't display.  Have spent the past few hours monkeying
around with IIS perms - at one point, couldn't access the app at all.  Have
now restored it to original functionality.  Asking the Q here because we
don't have access to newsgroups due to security restrictions, looking for a
good mail list (or some IIS pointers).  Any ideas?

Glen
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: More or Pager function is Perl

2002-05-16 Thread Ron Grabowski

 This is what I use in a program that mimics the Unix head command:

 http://www.perl.com/language/ppt/src/head/
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: HOWTO: break up a directory path name into components ...

2002-05-16 Thread Simmons, Aaron
Title: RE: HOWTO: break up a directory path name into components ...





All,


I have a subroutine splitFilename that I wrote that does this for me. It's been enhanced over time to include support for UNC, but this is the meat of that subroutine that handles directory/path/filename strings:


local($_) = $filename;
($file_d, $file_p_tl, $file_p, $file_f, $file_e) = m#^[\\/][\\/]#
 ? m#^([\\/][\\/][^\\/]+[\\/]) (([\\/][^\\/]+)*[\\/]) (.*?) ((\.[^.]+)*)$#x
 : m#^([a-z]:) (([\\/][^\\/]+)*[\\/]) (.*?) ((\.[^.]+)*)$#ix;


$file_e =~ s/^\.//;
__END__


The vars of interest are as follows:
$file_d -- drive letter (with colon)
$file_p -- path info (no trailing slash)
$file_p_tl -- path info (trailing slash)
$file_f -- filename (not including dot or extension)
$file_e -- extension


As I was testing these 5 lines, I realized the $file_f and $file_e doesn't work for a filename name with more then one period (.) in it! But I will leave as an exercise for the reader! :)

-Aaron


-Original Message-
From: Lawrence Lordanich (x11486) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 9:17 PM
To: perl win32 users
Subject: HOWTO: break up a directory path name into components ...



If I have a directory: c:\component1\component2\component3
how do I get at component[i]? I know I have seen this somewhere in my
reading but cannot find it now that I want it. Want a portable answer
too.


Thanks,


Lawrence.




--
Lawrence Lordanich Tel: +1 858-651-1486
Qualcomm Inc. (E-140F) Fax: +1 858-845-8222
4875 Eastgate Mall Email: [EMAIL PROTECTED]
San Diego, CA 92121-1978 TimeZone: GMT-8 (PST)

--





Re: HOWTO: break up a directory path name into components ...

2002-05-16 Thread Ron Grabowski

 I have a subroutine splitFilename that I wrote that does this for
 me.  It's been enhanced over time to include support for UNC, but this
 is the meat of that subroutine that handles directory/path/filename
 strings:

Not to be a wet blanket, but isn't File::Basename part of the core? I
looked in Basename.pm and file/directory name parsing has been somewhat
standardized in Perl since 1996.

 ($file_d, $file_p_tl, $file_p, $file_f, $file_e) = m#^[\\/][\\/]#
 ? m#^([\\/][\\/][^\\/]+[\\/]) (([\\/][^\\/]+)*[\\/]) (.*?)
 ((\.[^.]+)*)$#x
 : m#^([a-z]:) (([\\/][^\\/]+)*[\\/]) (.*?) ((\.[^.]+)*)$#ix;

Not having looked at that in too much detail, Basename.pm basically
gives this for Win32 systems:

 ($dirpath,$basename) = (/^(.*[:\]])?(.*)/s)
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs