Re: ARGV

2002-10-27 Thread Mark Goland
GreaT !!! changed the properties, it workS... :O) <~ happy Camper . Thanx much to BeaU and whom ever posted the fiX - Original Message - From: "Beau E. Cox" <[EMAIL PROTECTED]> To: "Mark Goland" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, October 28, 2002 2:12 AM Subject: RE

RE: ARGV

2002-10-27 Thread Beau E. Cox
Mark - Found the file association fix (if you need it): My Computer -> tools -> Folder options -> file types highlight PL and click 'advanced' highlight Open and click edit; be sure the association line looks something like this (correct for your path): "C:\PerlRoot\ActivePerl\bin\perl.exe" "%

RE: ARGV

2002-10-27 Thread Beau E. Cox
Mark - Copied and ran you script exactly as you have shown and it works. I named it t02.pl, so I ran it like: c:> perl t02.pl a b and got a b I am running ActivePerl 5.6.1 on W2K sp3. 1) Did your say 'perl' or just enter the script name? If not, try w/perl. 2) If that is the problem

ARGV

2002-10-27 Thread Mark Goland
hey guys, I am trying to run this code on ActiveState v5.6.1, doesnt seem to wanna print the arguments I am passing. Can some one please look over it and see if u can spot anything. #!c:\perl\bin\perl -w print "$ARGV[0]\t$ARGV[1]\n"; Thanx in Advance, Mark -- To unsubscribe, e-mail: [EMAIL

Re: Wildcards not working

2002-10-27 Thread Jeff 'japhy' Pinyan
On Oct 28, mike said: >I am trying to cd into a directory referenced by a value in a list with >wildcards like shell command First get the value from glob(): $value = "foo*"; @matches = glob $value; Then work with the values in @matches. -- Jeff "japhy" Pinyan [EMAIL PROTECTED]

Wildcards not working

2002-10-27 Thread mike
I am trying to cd into a directory referenced by a value in a list with wildcards like shell command ls test* or cd test* however nothing seems to work, I have tried amongst others $dir9= system("ls $dir1.*\$"); opendir(DIRLIST,"."); $dir9=grep$dir1.*\$, readdir DIRLIST -- Linux, Gnome what more

Re: Trouble with WinPerl @INC

2002-10-27 Thread Steve Grazzini
George Szynal <[EMAIL PROTECTED]> wrote: > 1. There is a dot at the end of the default @INC path string > 2. There is no comma or any seperator between the paths in >that string. It's not a string; it's an array. Try this. foreach (@INC) { print "$_\n"; } You'll notice that the dot

Function...

2002-10-27 Thread Piedro
Hello, I was wondering whether there is an integrated function in Perl, that makes strings' combinations,for example: I have 4 digits, each of which can take the discrete values of 0 and 1. I want to have these combinations as output. Thanx. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Trouble with WinPerl @INC

2002-10-27 Thread George Szynal
1. There is a dot at the end of the default @INC path string 2. There is no comma or any seperator between the paths in that string. I went to do the following append to @INC, when I noticed these troubles in the original @INC string. Is this only on WinPerl? ___

Re: Current working directory and @INC

2002-10-27 Thread George Szynal
Which I should probably have mentioned that all of this is to avoid editing the LIB entry for Makefile.PL, and let @INC do the work for me. - Original Message - From: "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> To: "Paul Johnson" <[EMAIL PROTECTED]> Cc: "George Szynal" <[EMAIL PROTECTED]>;

Re: Current working directory and @INC

2002-10-27 Thread George Szynal
Like so? use Cwd; $dir = getcwd(); $targetDir = $dir . //Contents//Resource//AddSystem//; push @INC, $targetDir;

Re: Current working directory and @INC

2002-10-27 Thread Jeff 'japhy' Pinyan
On Oct 27, Paul Johnson said: >On Sun, Oct 27, 2002 at 02:35:55PM -0500, Jeff 'japhy' Pinyan wrote: > >> On Oct 27, George Szynal said: >> >> >Please show a good way to append the current working directory to @INC. >> >> To append a value to any old array, you use push() >> >> @list = qw( a b c

Re: Easy one [getting "OCT" from localtime]

2002-10-27 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: > > On Oct 27, John W. Krahn said: > > >> So what did "localtime[4]" (without parens) do? > > > >my $x = localtime[4]; > > > >Is the same as: > > > >my $x = localtime; > > > >Which assigns the scalar value of localtime to $x. The [4] part is > >ignored. > > No, it is

Re: Current working directory and @INC

2002-10-27 Thread Paul Johnson
On Sun, Oct 27, 2002 at 02:35:55PM -0500, Jeff 'japhy' Pinyan wrote: > On Oct 27, George Szynal said: > > >Please show a good way to append the current working directory to @INC. > > To append a value to any old array, you use push() > > @list = qw( a b c ); > push @list, 'd'; And changing

Re: Current working directory and @INC

2002-10-27 Thread Jeff 'japhy' Pinyan
On Oct 27, George Szynal said: >Please show a good way to append the current working directory to @INC. To append a value to any old array, you use push() @list = qw( a b c ); push @list, 'd'; -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brothe

Current working directory and @INC

2002-10-27 Thread George Szynal
Please show a good way to append the current working directory to @INC. Will this work? (I'm not able to access my perl server at this time). Is there a way to do this without using Cwd? --- use Cwd; $dir= getcwd(); @INC = @INC . $dir; ---

Re: Need Help with MySQL disconnect command

2002-10-27 Thread Todd W
Safelistsmart wrote: I am trying to fix a an error in a set of scripts I purchased, but cannot seem to get support for. I am getting the following error in my server log, which coincides with a "configuration" error seen by the user in their browser. What is odd, is that even though we are bein

Need Help with MySQL disconnect command

2002-10-27 Thread SafelistSmart
I am trying to fix a an error in a set of scripts I purchased, but cannot seem to get support for. I am getting the following error in my server log, which coincides with a "configuration" error seen by the user in their browser. What is odd, is that even though we are being told in the log and

Re: Easy one [getting "OCT" from localtime]

2002-10-27 Thread Jeff 'japhy' Pinyan
On Oct 27, John W. Krahn said: >> So what did "localtime[4]" (without parens) do? > >my $x = localtime[4]; > >Is the same as: > >my $x = localtime; > >Which assigns the scalar value of localtime to $x. The [4] part is >ignored. No, it is not ignored. localtime() takes an argument -- a number of

catching error string from MySQL using DBI

2002-10-27 Thread aman cgiperl
I use DBI in my CGI-PERL coding. How can I get the exact output string (error/success) for display, that I would receive from the MySQL on executing the same query on the command line mysql> Thanks Aman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: Any Perl versions of ...

2002-10-27 Thread Felix Geerinckx
on za, 26 okt 2002 09:16:33 GMT, Paul Company wrote: > I'm looking for the following programs written in portable Perl. > What I mean by "portable" is the script doesn't > contain system() or backticks (``). > > vi written in perl > cvs written in perl > gzip written in perl Stop looking - you w

RE: stripping web pages

2002-10-27 Thread Steven_Massey
Beau lots to understand in there .. I'll certainly be looking at the LWP::UserAgent stuff thanks - much appreciated Steve -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Easy one [getting "OCT" from localtime]

2002-10-27 Thread John W. Krahn
K Pfeiffer wrote: > > This lost me for a moment. I figured it out by trying... > > #!/usr/bin/perl > use warnings; > use strict; > # test "get uc month from localtime" > > my $month = qw(JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV > DEC)[(localtime)[4]]; > > print localtime,"\n"; > my $x = loca

RE: Testing for hidden or system files

2002-10-27 Thread ss004b3324
Hi, > Does anyone know how to test for a hidden or system file under Windows > 95/2000? This works: use strict; use Win32::File; my $attr; my $file = 'C:\Perl\Scripts\test.txt'; Win32::File::GetAttributes($file,$attr ); if ($attr & HIDDEN || $attr & SYSTEM) { print "$file attributes are: $at

Re: Easy one [getting "OCT" from localtime]

2002-10-27 Thread K Pfeiffer
John W. Krahn writes: > Jeff 'Japhy' Pinyan wrote: [...] > > my $month = (split ' ', uc localtime)[1]; > > > > localtime(), in scalar context, returns a string like > > > > "Fri Oct 25 10:30:23 2002" > > > > I'm uppercasing it, splitting it on whitespace, and getting the 2nd > > element ("OCT")

Re: read from a file

2002-10-27 Thread K Pfeiffer
Vo, Synh writes: > I changed the code and still got errors. [...] > print NEW "grant select , update, delete, insert on " $item " > user;" ; [...] > syntax error at grant.pl line 13, near ""grant select , update, delete, > insert on " $item " > String found where operator expected at g