RE: configure perlscript
thanks but if there is another way to do this (a perl configuration script maybe -- that edits the required parts of the registry or whatever thing the activeperl installation program does), I'd like to know it :) -Original Message- From: Jeff Griffiths [mailto:[EMAIL PROTECTED] Sent: Thursday, December 18, 2003 12:36 AM To: Burak Grsoy Cc: Perl-Win32-Users Subject: Re: configure perlscript Burak Grsoy wrote: I've installed activeperl (a long time ago) on win98 and now I'm using windows 2000 for a while, but I'm also using perl that I've installed on win98, because of this, I can not use perlscript in asp pages and wsh under windows2000, is there a way to *fix* this problem or must I install perl again? I rarely need perlscript but I need it for the OLE Browser that comes with ActivePerl... i assume you want to use the same perl because you want to preserve the modules you have installed over the same period of time, etc. also you might not be sure where to get said (i assume older) version. first off, all previous ActivePerl releases are available here: ftp://ftp.activestate.com/ActivePerl What I recommend is this: 1. backup your precious perl install to a zip file in case something goes wrong =) 2. delete all subfolders and files in c:\perl except site/lib 3. grab an installer for the exact same version of ActivePerl from the ftp and then install it directly over top. This should preserve any installed / compiled modules that aren't included with that ActivePerl, as well as restoring PerlScript etc. 4. if anything is amiss you can still restore specific files from your back-up =) regards, jeffG ___ 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: OOP and variables!
because you are trying to call a subroutine inside a string... there is a trick to do this, but I find it unnecessary. you can use printf() printf new Obj-Phone is %s ,$Obj-phone; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Friday, October 31, 2003 4:18 PM To: [EMAIL PROTECTED] Subject: OOP and variables! Hello all , I need to keep an array of lists and I tried to do this in OOP style meanyng that I am keeping now an array of my objects. Here is how my package looks like: package mypackage; use strict; ## # constructor ## sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; $self-{PHONE} = undef ; bless($self,$class); return $self; } sub phone { my $self = shift; if ( @_ ) {$self-{PHONE} = shift;} return $self-{PHONE}; } 1; I have more things like PHONE , this is just a snipset. Now in my application I am doing use mypackage; my $Obj = new mypackage ; sub Test { $Obj-phone(hsagdhasg); print new Obj-Phone is $Obj-phone() ; } For the last statement I get printed something like 'mypackage=HASH(0x2347e10)-phone()' and I cannot use this for example in a join statement unless I get another variable and do $x=$Obj-phone() ; I do not want to use this second variable. Any ideea of how to do this and maybe some short explanation why so ? Thanks, Nicu ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
OpenGL
is it possible to use the OpenGL module on windows? http://search.cpan.org/~ilyaz/OpenGL/ ... and; are there any binaries somewhere? ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
sub() or eval() ?
Which one is better (equal?)? why? %some_hash = ( blah = sub { bleh() }, foo = sub { $bar - $baz / 100 }, . . . ); $some_hash{foo}-(); [or] %some_hash = ( blah = 'bleh()', foo = '$bar - $baz / 100', . . . ); eval { $some_hash{foo} }; Well... I'm curious about sub()... ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
parse search string?
I've searched cpan but only found some APIs to several search engines... I want to parse search string and split parameters. like user can put a plus sign for wanted words and minus for not-wanted or put single or double quotes or some other weird thing etc... if such a module exists I'd like to know :) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
'generic' member management?
Is there a perl module or anything in any language like this? I mean, we only pass some parameters like where the data is and define some required data like username and password areas and it will return a member object to use? it can be a cgi or anything... I'm just curious :) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[Win32::GUI] How can I add links to a Richedit?
I want to add html-like clickable hyperlinks inside a richedit. How can I do this with Win32::GUI? ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Win32::GUI - How can I add links to a Richedit control?
Sorry for sending this one two times... There was an error in the mail server last weekend I think... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Burak Grsoy Sent: Sunday, March 30, 2003 8:23 PM To: Perl-Win32-Users Subject: Win32::GUI - How can I add links to a Richedit control? I want to add html-like clickable hyperlinks inside a richedit. How can I do this with Win32::GUI? ___ 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: Win32 Icon (resource) extraction from exe/dll
If there is a perl way to extract icons and such things from a file, I'd also like to know it... Not any commercial progs please... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gregory, Carlton Sent: Friday, March 14, 2003 4:37 PM To: [EMAIL PROTECTED] Subject: RE: Win32 Icon (resource) extraction from exe/dll In the Perl Development Kit from ActiveState there is a utility named PerlApp that allows you to bind files with perl scripts and create an .exe. you call a subroutine PerlApp::extract_bound_file(filename) and the file is extracted to a temporary directory on the filesystem. The file is deleted when the .exe is closed. -Original Message- From: D Smith [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 9:14 AM To: [EMAIL PROTECTED] Subject: Win32 Icon (resource) extraction from exe/dll Does anyone know of a script/module that will extract resources (esp. icons) from Win32 executable-format files? Or can anyone recommend a reference to these executable file formats with respect to resources? Thanks! D. Smith __ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com ___ 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 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Tk question
I found that packForget() is doing (nearly) what I want :) But instead of updating the area, it deletes the hlist part... -Original Message- From: Burak Gürsoy [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 15, 2003 3:28 PM To: Tillman, James; Perl-Win32-Users Subject: RE: Tk question Thank you :) pack() did it. [snip] ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Scroll mouse in a Tk window?
Maybe a silly question but, can we use the wheels of a scroll mouse in a Tk window? I couldn't find a way to do this... ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Tk icon - transparent?
I archive some old messages, and used the code that Chris Anderson posted last year to replace the Tk icon with an image I've defined. I've realised that Tk accepts base64 encoded image codes, instead of a raw image data, so I've changed the code a little: if (my $image = image('logo.gif')) { my $icon = $mw-Photo(-data = $image-[1],-format = $image-[0]); $mw-idletasks; # this line is crucial $mw-iconimage($icon); } But I couldn't find a way to make this image's background transparent (I've tried with '-file' also). If I create a transparent gif, it is shown as partially transparent. So, is there a way? ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Tk question
Thank you :) pack() did it. The code I'm referring is, in the User Contributed Demonstrations section of widget It's name is HList and ItemStyle, multicolumn listbox with individual cell styles I'm just writing this for a search program for my mp3 archive. It was (and is) a console program, but I've decided to put a gui around it. It only prints out an array of results: @results = ([$id3_name,$which_cd,$time_of_the_file,$filename]); Anyway, I have a new question :) I can not search now. I put a search entry and a button, I can get the value entered, but I couldnt find a way to refresh the list. If I re-call the sub that prints HList, it simply adds a new section below the old one and this goes on... It looks like, refreshing is done by callbacks, but I didnt understand the mechanism very well... The search entry uses this but I couldnt adapt this to the hlist part. Can you give an example or forward me to a tutorial about this? Tk pods are not very descriptive... The code I'm using: [CODE] # this is another example's code from widget # to get the search string my $search_string = ''; my $string = $mw-Frame; my $ss = $string-LabEntry(-label= 'Search for:', -width= 40, -labelPack= [-side = 'left', -anchor = 'w'], -textvariable = \$search_string, )-pack(-side = 'left'); my $ss_button = $string-Button(-text = 'Search!'); $ss_button-pack(-side = 'left', -pady = 5, -padx = 10); $string-pack(-side = 'top', -fill = 'x'); $command = sub { search_mp3($search_string) }; $ss_button-configure(-command = $command); $ss-bind('Return' = $command); # this is the HList part my $h = $mw-Scrolled('HList',%options)-pack(-expand=1, -fill='both'); $h-header('create', $_, -text = $labels[$_]) for (0..$#labels); # this is a little changed version of the example: my($y,$e,$col,$style); for $y (0 .. $#results) { $e = $h-addchild(); for $col (0 .. $#labels) { $style = $h-ItemStyle('text'); $style-configure(-foreground = $conf{fg_color}, -background = $conf{bg_color}, -font = $conf{font}); $h-itemCreate($e= $col, -itemtype = 'text', -style= $style, -text = ($col == 0) ? ($y+1) : $results[$y]-[$col-1]); } } [/CODE] -Original Message- From: Tillman, James [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 9:07 PM To: 'Burak Gürsoy'; Perl-Win32-Users Subject: RE: Tk question The fact that you are using the grid manager is one source of the problem. Grid won't stretch to resize automatically. If you try using pack(), it might work better: $mw-Scrolled('HList', -scrollbars = 'oeos', -header = 1, -columns = 4, -width = 100, -height = 30, )-pack(-expand=1, -fill='both',); Of course, depending on what else you're doing in that window, pack might not work. I've usually been able to make it do what i want to do, however. Judicious use of frames can usually help lay things out properly. Pack's layout manager is somewhat like that of most web browsers when rendering HTML (at least in the way the elements are able to autostretch in size and align left and right in the layout), so using frames would be somewhat analogous to using tables in HTML to isolate sections of the page and manipulate them as a whole (although there are many differences, too) Hope this helps you out... jpt ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
bless question
Can anyone explain this? is this a bug or feature? #!/usr/bin/perl -w use strict; package Test::One; sub new { my $class = shift; my $self = {}; bless $self, $class; return $self; } package Test::Two; sub new { my $class = shift; my $test_it = shift; my $self= $test_it; bless $self, $class; return $self; } package main; my $test_one = Test::One-new(); print [Before] ref(\$test_one) = ,ref($test_one),\n; my $test_two = Test::Two-new($test_one); print [After ] ref(\$test_one) = ,ref($test_one),\n; ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: IP Address
hmm... ok :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Carl Jolley Sent: Friday, January 10, 2003 10:00 PM To: Burak Grsoy Cc: [EMAIL PROTECTED] Subject: RE: IP Address On Fri, 10 Jan 2003, [iso-8859-9] Burak Grsoy wrote: why? -Original Message- From: Carl Jolley [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 5:36 AM To: Burak Grsoy Cc: [EMAIL PROTECTED] Subject: RE: IP Address [snip] Change __END__ to __DATA__. So you can have both. Also with newer versions of perl there's a minor technical difference. [EMAIL PROTECTED] Carl Jolley All opinions are my own and not necessarily those of my employer ___ 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: Find and stop and first instance of (A,B,C,...)
my($ca,$b); while (($data) = $sth-fetchrow_array) { if($data =~ /^A$/i) { print a name=\A\/a unless $ca; $ca = 1; } if($data =~ /^B$/i) { print a name=\B\/a unless $cb; $cb = 1; } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of steve silvers Sent: Thursday, January 02, 2003 10:59 PM To: [EMAIL PROTECTED] Subject: Find and stop and first instance of (A,B,C,...) I'm getting rows from my database and ordering them by name ASC. So they come in in alphabetical order. I want to find the first instance of the letters in the alphabet. while (($data) = $sth-fetchrow_array) { if($data =~ /^A$/i) { print a name=\A\/a; } if($data =~ /^B$/i) { print a name=\B\/a; } } And so on But I only want to print the a name tag at only the first instance of A not all of them, and this goes for the rest on them also. Any suggestions on this would be greatly appreciated. Thanks in advance. Steve _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus ___ 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: Pattern match file extenstions
if(/\.(exe|bat)$/i) { # i: ignore case # do something } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of steve silvers Sent: Friday, November 08, 2002 2:56 AM To: [EMAIL PROTECTED] Subject: Pattern match file extenstions Im trying to match on both .bat and .exe files. Why won't this work? I have tried this many different ways. /\*.exe|.bat/so on... if($_ =~ /(\*.exe|.bat\$)/) { bla... bla } Thanks in advance Steve. _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail ___ 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: File::Recurse Question
$_ = 'c://WINDOWS/system32/winver.exe'; my @tmp = split /\//; print pop @tmp; #or print $tmp[-1]; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of steve silvers Sent: Friday, November 08, 2002 3:58 PM To: [EMAIL PROTECTED] Subject: File::Recurse Question The below snippet works great an returns all the directories and files but the problem is that when the files print out they are shown with there complete path. ie: c://WINDOWS/system32/winchat.exe c://WINDOWS/system32/winhlp32.exe c://WINDOWS/system32/winlogon.exe c://WINDOWS/system32/winmine.exe c://WINDOWS/system32/winmsd.exe c://WINDOWS/system32/winspool.exe c://WINDOWS/system32/winver.exe How can I get rid of the path for the files and just have the file names. winchat.exe winhlp32.exe winlogon.exe winmine.exe winmsd.exe winspool.exe winver.exe #!/Perl use File::Recurse; $directory = 'c:/'; recurse (\printall, $directory); sub printall { # Find files. unless (-d $_) { print $_\n } else { # Find dirs. print Dir: $_\n; } } Thanks in advance. Steve. _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail ___ 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: ole? notepad?
Actually, I've asked a perl way to do this. And without a temporary file. I didnt try the answers in the other messages, but it is possible as i see... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Paul Bo Peaslee Sent: Tuesday, May 28, 2002 4:32 PM To: Burak Grsoy; ActivePerl Subject: Re: ole? notepad? how can i launch notepad and print something in it? You can print with Notepad from a shell command line using the following: prompt notepad /p filename.txt There's several ways (as one would expect from Perl) to launch that command line. Try: perl -e `notepad /p filename.txt` to test. Note the use of ` (backtick). I'd use the following in a script: system `notepad /p filename.txt`; ___ 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