SQL DATA BASE

2001-05-07 Thread Hasan Ueguer
Hello, I have a SQL data base on the server ( Server's name is FN5891 ). The data base name is FDB007 and the view's name is V_ISCADUSER. I use the interface ODBC ( open data base connector ) and authentication about Windows NT4.0. Who I connected the SQL data base and get the data ? Hasan --

can't open filehandle

2001-05-07 Thread Eric Van Buggenhaut
Hi, I'm learning Perl with excellent "Learning Perl" from O'Reilly. One of the examples given doesn't work on my computer though and I really can't figure out why. Here's the script : #/usr/bin/perl -w open(PW,"/etc/passwd") || die "How did you get logged in?"; while () { ($

Re: can't open filehandle

2001-05-07 Thread Me
> #/usr/bin/perl -w should be #!/usr/bin/perl -w ie, with a ! after the #. If you are invoking this without 'perl ' in front of the script name, then your OS will think it's a shell script...

to reach an URL

2001-05-07 Thread Stéphane JEAN BAPTISTE
I'm looking for a command which permit to reach an URL from the script. tks PS: sorry for my english :-)

regexp trouble

2001-05-07 Thread Johan Groth
Hi, I want to strip a variable of all characters including a token, i.e. aaa_bbb_ccc_ddd would become bbb_ccc_ddd. As you can see I want to get rid of aaa_. Does anyone know how to acomplish this in Perl? I've tried: $tmp = "aaa_bbb_ccc_ddd" $tmp =~ /^\w+_/ $tmp = $'; but that results in $tmp e

Re: regexp trouble

2001-05-07 Thread Andrew Teo
try this : $tmp =~ tr/a/ /; Johan Groth wrote: > > Hi, > I want to strip a variable of all characters including a token, i.e. > aaa_bbb_ccc_ddd would become bbb_ccc_ddd. As you can see I want to get rid of > aaa_. Does anyone know how to acomplish this in Perl? > > I've tried: > $tmp = "aaa_

Re: regexp trouble

2001-05-07 Thread Johan Groth
Andrew Teo wrote: > > try this : > $tmp =~ tr/a/ /; I see I need to be a bit more specific. The above would change the a's to spc but what I want is to strip the string of all characters up to and including the first underscore. Ie aaa_bbb_ccc would become bbb_ccc and sometext_more_text would be

Re: regexp trouble

2001-05-07 Thread Tony Cook
On Mon, 7 May 2001, Johan Groth wrote: > Hi, > I want to strip a variable of all characters including a token, i.e. > aaa_bbb_ccc_ddd would become bbb_ccc_ddd. As you can see I want to get rid of > aaa_. Does anyone know how to acomplish this in Perl? > > I've tried: > $tmp = "aaa_bbb_ccc_ddd"

Re: regexp trouble

2001-05-07 Thread Johan Groth
Tony Cook wrote: > [snip] > > or by literally choosing the characters you want to match (preferably > using ranges): > >$tmp =~ s/^[a-z0-9]+_//i; Thank you! That did the trick. /Johan -- Johan Groth (xghjn) ! Tel. mobil: 0703 - 24 25 27 Cell Network! Kontoret:

Re: regexp trouble

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Johan Groth wrote: > I want to strip a variable of all characters including a token, i.e. > aaa_bbb_ccc_ddd would become bbb_ccc_ddd. As you can see I want to get rid of > aaa_. Does anyone know how to acomplish this in Perl? > > I've tried: > $tmp = "aaa_bbb_ccc_ddd" > $tmp

Re: to reach an URL

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Stéphane JEAN BAPTISTE wrote: > I'm looking for a command which permit to reach an URL from the script. use LWP::Simple; my $url = 'http://some.domain.com'; my $page = get($url); There are plenty more ways to get urls via LWP and the HTTP modules. -- Brett

Re: regexp trouble

2001-05-07 Thread Dale Owens
By adding the \W as in $temp =~ s/^[a-z0-9\W]+_//i; You can also strip any punctuation such as ' and " from the string. - Original Message - From: Brett W McCoy <[EMAIL PROTECTED]> To: Johan Groth <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, May 07, 2001

Re: regexp trouble

2001-05-07 Thread Jeff Pinyan
On May 7, Johan Groth said: >I want to strip a variable of all characters including a token, i.e. >aaa_bbb_ccc_ddd would become bbb_ccc_ddd. As you can see I want to get rid of >aaa_. Does anyone know how to acomplish this in Perl? > >I've tried: >$tmp = "aaa_bbb_ccc_ddd" >$tmp =~ /^\w+_/ >$tmp

Re: regexp trouble

2001-05-07 Thread Jeff Pinyan
>> $tmp =~ s/^([A-Za-z]+_)(.*)/\2/; >> >> I think the problem is that \w matches an underscore also, and the regexp >> is being greedy as well. There's probably an even better way to do it >> (especially if your strings have foreign characters at it), but that was >> what occurred to me off the t

Re: regexp trouble

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Jeff Pinyan wrote: > You're also using \2 on the right-hand side (RHS) of a s///, which is not > safe. You should use $2. > > s/^[A-Za-z]+_//; > > does far less work. Yeah, I realized that after I already sent the reply. It's what I get for popping off replies with insuff

RE: Back slash (Solved)

2001-05-07 Thread Paul
--- justin todd <[EMAIL PROTECTED]> wrote: > thanks Paul > This did the trick!! You're very welcome. Since that was it, do you understand why? In Perl, single-quoted strings are not interpolated (that is, are not parsed for special characters or variables). Thus, if $foo='hi'; then '$foo'

More hash trouble

2001-05-07 Thread Craig Moynes/Markham/IBM
Stumped on this problem my ( %self ); $self->{DF_SPEC} = { a => '(Mon|Tue|Wed|Thu|Fri|Sat|Sun)', A => '(Monday|Tuesday|Wednesday|Thursday|Friday)', b => '(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)', B => '(January|February|March|April

Re: More hash trouble

2001-05-07 Thread Jeff Pinyan
On May 7, Craig Moynes/Markham/IBM said: >Stumped on this problem >my ( %self ); You're creating a hash above... >$self->{DF_SPEC} = { And then populating a hash reference ($self is not %self). >a => '(Mon|Tue|Wed|Thu|Fri|Sat|Sun)', >A => '(Monday|Tuesday|Wednesday

Re: More hash trouble

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Craig Moynes/Markham/IBM wrote: > Stumped on this problem > my ( %self ); > > $self->{DF_SPEC} = { Why do you define %self as a hash then use it is if it were a reference to a hash? This may not be the cause of your problem, but it is an inconsistency. Are you using -w and

Re: More hash trouble

2001-05-07 Thread Timothy Kimball
: $self->{DF_SPEC} = { : ... : c => "$self->{DF_SPEC}{a} ...", : : }; : : print "$self->{DF_SPEC}{'b'}\n"; : print "$self->{DF_SPEC}{'h'}\n"; : : : Produces the output: : (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) : : : Any ideas ? You're trying to use parts of the $se

RE: to reach an URL

2001-05-07 Thread McCormick, Rob E
Tried perldoc LWP::Simple noted the example: perl -MLWP::Simple -e 'getprint "http://www.sn.no";' so I tried: /usr/central/bin/perl -MLWP::Simple -e 'getprint "http://foo.acme.com/";' # perl is in /usr/central/bin on Unix the error is: 501 Protocol scheme 'hostfirewall.acme.com' is not suppor

Re: More hash trouble

2001-05-07 Thread Craig Moynes/Markham/IBM
interesting ideas. I will definitely use the self-documenting variable creation method, extra assignments be damned :) Would it also be wise to use the qr// ? Such as: my $shortDayName = qr/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)/; then for example I could do: my $abcXYZ = qr/$shortDayNa

RE: to reach an URL

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, McCormick, Rob E wrote: > 501 Protocol scheme 'hostfirewall.acme.com' is not supported > http://foo.acme.com/> > # names changed to protect the innocent > > Why does that happen? Is it picking up our firewall from an ENV variable > that's part of the shell? > Do I need to tel

Re: More hash trouble

2001-05-07 Thread Jeff Pinyan
On May 7, Craig Moynes/Markham/IBM said: > interesting ideas. I will definitely use the self-documenting >variable creation method, extra assignments be damned :) > >Would it also be wise to use the qr// ? > >Such as: >my $shortDayName = qr/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)/; > >then for examp

XML

2001-05-07 Thread Stephen E. Hargrove
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm trying to install Bundle::XML. Here's a quick rundown: # perl -MCPAN -e shell cpan> install Bundle::XML . . . . . . PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib - -I/usr/local/lib/perl5/5.6.1/i686-linux -I/usr/local/lib/perl5/5.6.1

Re: Regex "([^"]*)

2001-05-07 Thread Paul
--- Clinton <[EMAIL PROTECTED]> wrote: > WOW, thanks a heap. This is the best list ever. lol -- high praise! > The final code that seems to work is: > > use strict; > my $file = "test.txt"; > my $stuff="e:/$file"; > open STUFF, $stuff or die "Cannot open $stuff for read :$!"; > my $file_conten

Re: More hash trouble

2001-05-07 Thread Timothy Kimball
: >Would it also be wise to use the qr// ? : > : >Such as: : >my $shortDayName = qr/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)/; : > : >then for example I could do: : >my $abcXYZ = qr/$shortDayName ABC/; : : You don't need to use the ()'s in the regex if you don't plan on capturing : anything, by

Re: More hash trouble

2001-05-07 Thread Jeff Pinyan
On May 7, Timothy Kimball said: >For a mind-blowing example of this technique of building big regexes >from little ones, see Appendix B of Jeffrey Friedl's book "Mastering >Regular Expressions". And for extra credit, parse the regex on pg 316 >by hand. ;) Heh, that work is made somewhat simpler

Re: regexp trouble

2001-05-07 Thread Paul
--- Tony Cook <[EMAIL PROTECTED]> wrote: > On Mon, 7 May 2001, Johan Groth wrote: > > I want to strip a variable of all characters including a token, > > aaa_bbb_ccc_ddd would become bbb_ccc_ddd. > > . . . > > I've tried: > > $tmp = "aaa_bbb_ccc_ddd" > > $tmp =~ /^\w+_/ > > $tmp = $'; > > but th

Re: generating passwords

2001-05-07 Thread Joe McMahon
On Sat, 5 May 2001, cherukuwada subrahmanyam wrote: > Hi, > Is there any easy way to generate random string of particluar length. > The idea is to generate passwords randomly. Here is some code which produces wordlike passwords via random probes into a dictionary. The results are wordlike, but n

db connect

2001-05-07 Thread justin todd
Hi Folks I am running a IIS server and MSSQL7, both on the same machine. The database server is called JUSTIN. The database is called test and the table is called test. This is my connect string. $dbh = DBI->connect('DBI:ODBC:test',''); This is my error. CGI Error The specified CGI applic

Re: to reach an URL

2001-05-07 Thread Jos Boumans
Stephane, what you are looking for is the LWP module.. it comes standard with any ActiveState perl release but is not standard with Linux (or at least RedHat) try search.cpan.org if you need to obtain and look for "LWP" you'll find the documentation very informational. Regards, Jos Boumans Stép

Re: db connect

2001-05-07 Thread M.W. Koskamp
- Original Message - From: justin todd <[EMAIL PROTECTED]> To: Beginners (E-mail) <[EMAIL PROTECTED]> Sent: Monday, May 07, 2001 6:30 PM Subject: db connect > Hi Folks > > I am running a IIS server and MSSQL7, both on the same machine. > > The database server is called JUSTIN. The da

RE: db connect

2001-05-07 Thread blowther
In other words, you need configure Windoz to add the data source. Start | Settings | Control Panel | Data Sources (ODBC). You'll have to check your manuals, what entries go in this section... (Beyond the scope of Perl Beginners list). Bruce W. Lowther [EMAIL PROTECTED] Micron Technology, Inc. B

scalar vs. vector context

2001-05-07 Thread Lonya Julin
Hi there, I could use some help with printing array/list contents, rather than length. In the class I'm taking, we learned that if you print it within a C-string, the contents will print, but if it's in scalar context (ie. $a = @a ; print $a) then you'll get the length of the list. In my script,

Re: scalar vs. vector context

2001-05-07 Thread Timothy Kimball
:@possWords = push(@possWords,$temp) ; This line is the problem. push() returns the number of elements in the array after the new elements have been pushed onto it. Get rid of the "@possWords = " part of this line. -- tdk

Re: scalar vs. vector context

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Lonya Julin wrote: >@possWords = push(@possWords,$temp) ; Err... this is your problem. You are pushing your value onto @possWords, then returning the number of elements into the same array. I don't think this is what you want. push returns a $calar value with the new

Parsing a string....

2001-05-07 Thread Craig Moynes/Markham/IBM
Ok I know I know how to do this but I just can't get it out of my brain I have a string like this: $string1 = "[%a %H:%M:%S %c] - - etc.etc.etc"; I need to parse out all the substrings that are similar to "%x" (where x is any letter) I have thought about tackling this using the regexp (%\w) usi

Thanks re: scalar vs. LIST context

2001-05-07 Thread Lonya Julin
Thanks to Timothy Kimball and Brett McCoy for answers to my problem, included below... Original Message Subject: Re: scalar vs. vector context Date: Mon, 7 May 2001 15:11:37 -0400 (EDT) From: [EMAIL PROTECTED] (Timothy Kimball) To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] : Do

Re: Parsing a string....

2001-05-07 Thread Timothy Kimball
: I have thought about tackling this using the regexp (%\w) using the : grouping and getting each match with $n (where n is a number) but I can't : seem to get the regexp to match more than the first match. Have you tried using the "g" regex option? e.g., /.../g -- tdk

Re: Parsing a string....

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Craig Moynes/Markham/IBM wrote: > I have a string like this: > $string1 = "[%a %H:%M:%S %c] - - etc.etc.etc"; > > I need to parse out all the substrings that are similar to "%x" (where x is > any letter) > > I have thought about tackling this using the regexp (%\w) using the >

Re: Parsing a string....

2001-05-07 Thread Paul
--- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote: > . . . > I have a string like this: > $string1 = "[%a %H:%M:%S %c] - - etc.etc.etc"; > > I need to parse out all the substrings that are similar to "%x" > (where x is any letter) try my @chars = $string1 =~ /%(.)/g; #:o) You can proba

RE: Parsing a string....

2001-05-07 Thread Wagner-David
Here is a shot and I am just printing. You could substitute for the while an Arra: #!perl -w $string1 = "[%a %H:%M:%S %c] - - etc.etc.etc"; while ( $string1 =~ /(%.)/ig ) { printf "%-s\n", $1; } If you want to capture to an array: my @array = $string1 =~ /(%.)/ig; foreach ( @array ) {

Re: Parsing a string.... [addendum]

2001-05-07 Thread Paul
--- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote: > . . . > I have a string like this: > $string1 = "[%a %H:%M:%S %c] - - etc.etc.etc"; > > I need to parse out all the substrings that are similar to "%x" > (where x is any letter) If you sepcifically need an alpha character, you might try

Re: Parsing a string....

2001-05-07 Thread Sean McAfee
"Craig Moynes/Markham/IBM" <[EMAIL PROTECTED]> wrote: >I have a string like this: >$string1 = "[%a %H:%M:%S %c] - - etc.etc.etc"; >I need to parse out all the substrings that are similar to "%x" (where x is >any letter) Use a global pattern match in array context: @matches = $string1 =~ /%[A-Za

Re: Parsing a string....(SOLVED)

2001-05-07 Thread Craig Moynes/Markham/IBM
Thanks, I don't know why I was having so much trouble with that. I was trying to use the $1, $2 etc variables but that didn't seem to work. Have to buy a good perl book in addition to my O'Reilly Nutshell Book. thanks again for the borrowing of your brains --

Re: Parsing a string....(SOLVED)

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Craig Moynes/Markham/IBM wrote: > Thanks, I don't know why I was having so much trouble with that. > I was trying to use the $1, $2 etc variables but that didn't seem to work. > Have to buy a good perl book in addition to my O'Reilly Nutshell Book. I can recommend ones with a

where's GDBM?

2001-05-07 Thread Paul
Okay, my turn to ask a newbie question. =o) Our HPUX box didn't have GDBM installed, so I just downloaded and compiled it from GNU, but I still don't have GDBM_File.pm, and I don't see any way to get it aside from either dowgrading to 5.005 or cross-grading to 5.7. I'd rather not use the experime

Re: where's GDBM?

2001-05-07 Thread Casey West
On Mon, May 07, 2001 at 02:57:54PM -0700, Paul wrote: : Okay, my turn to ask a newbie question. =o) : : Our HPUX box didn't have GDBM installed, so I just downloaded and : compiled it from GNU, but I still don't have GDBM_File.pm, and I don't : see any way to get it aside from either dowgrading t

perl books (was Re: Parsing a string....(SOLVED))

2001-05-07 Thread Me
> I recommend: > Programming Perl > Learning Perl > The Perl Cookbook > > Get them and use them. Some picks from my Perl library related to what you seem to want to do (quick and dirty parsing): 2nd and 3rd editions of the Camel (PP) LP for perl 4. The Cookbook Perl for Syst

Re: where's GDBM?

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Paul wrote: > Okay, my turn to ask a newbie question. =o) > > Our HPUX box didn't have GDBM installed, so I just downloaded and > compiled it from GNU, but I still don't have GDBM_File.pm, and I don't > see any way to get it aside from either dowgrading to 5.005 or > cross-gra

Re: perl books (was Re: Parsing a string....(SOLVED))

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Me wrote: > Data Munging with Perl is another option. > It has a very different feel from the above books. > It goes through its topics in a systematic fashion -- > it seemed almost plodding to me, with perhaps > 3 jokes in the entire book. However it remains a > high quality

UNTIE () ERROR

2001-05-07 Thread Anshu Anshu
Hi all, I am geting this error message while trying to run my perl script. Can't modify reference constructor in untie at ./keeq.pl line 320, near "$dbref)" BEGIN not safe after errors--compilation aborted at ./keeq.pl line 327. below is few portion of my script. Let me know if you can help m

Re: UNTIE () ERROR

2001-05-07 Thread Jeff Pinyan
On May 7, Anshu Anshu said: >Can't modify reference constructor in untie at ./keeq.pl line 320, near >"$dbref)" >BEGIN not safe after errors--compilation aborted at ./keeq.pl line 327. You are trying to untie a reference to a hash. Remove the \ in front of the variable. > 316 sub close_db >

Re: XML

2001-05-07 Thread David Monarres
Stephen, I will qualifythis by saying that I am not an expert on MCPAN but it would appear that you probably do not have the module XML::Parser installed. Which doesn't make that much sence considering that I thought that MCPAN checks dependencies, and that XML::Parser would look like it s

beginner here - with basic cgi trouble

2001-05-07 Thread Chip Wiegand
Hi, I have download some perl/cgi scripts from various web sites and am having the darndest time getting them to work. I have my own apache web server to work on, so cgi access is no problem. I am running FreeBSD on my client machine to download the scripts, do the configuring, then copy the files

Re: beginner here - with basic cgi trouble

2001-05-07 Thread Brett W. McCoy
On Mon, 7 May 2001, Chip Wiegand wrote: > Any suggestions as to what I should be changing so I can get some scripts > to run properly? It's hard to say, not knowing what the scripts are, what modules or libraries they use, or what kinds of errors they are spewing out. 'Internal Server Error' can

Re: beginner here - with basic cgi trouble

2001-05-07 Thread Ross Larner
If you have shell access to the server where the scripts live, you should be able to see more descriptive error messages by executing the script directly, ex: $ /usr/local/cgi-bin/yourFile.cgi Ross At 07:56 PM 5/7/2001 -0700, Chip Wiegand wrote: >Hi, >I have download some perl/cgi scripts from

send variable

2001-05-07 Thread nakosu-budi
i have problem with send variable to other page. i have form and the form has variable will send to other page. but i can't do it. anybody can help me? thank you

Refresh Button

2001-05-07 Thread Helio S. Junior
Hello, I would like to know if it's possible to do the following: When the user clicks on the Refresh Button of Internet Explorer and my WebPage refreshes, i also have to 'insert' some information on the inside the Page. Is it possible to do it? If so, how? Any Sample code? Thanks in Advance,