Re: regd Pl/Sql blocks in DBI

2001-06-08 Thread John Joseph Trammell
On Thu, Jun 07, 2001 at 06:13:25PM -0700, Prabaharan Dorairajan wrote: Hi, I am unable to pass values from perl to Oracle using DBI. Could any one help me? Here is the program: #!/depot/perl/rel/bin/perl #!/depot/perl/rel/bin/perl -w use strict; use DBI; my (dbh,sth); ???

Re: fetchhash question

2001-06-07 Thread John Joseph Trammell
On Thu, Jun 07, 2001 at 04:34:48PM -0400, Bradshaw, Brian wrote: You guys have been so nice.. I have another question :) What does fetchhash do? I have the code : $return_hash = $dbh-query($query) or print $query\n\n; %result = $return_hash-fetchhash(); But I am unsore of

Re: $ENV

2001-06-07 Thread John Joseph Trammell
On Thu, Jun 07, 2001 at 07:51:50PM -0400, Luinrandir Hernson wrote: I have tried perldoc -f env perldoc -f http perldoc -f %env perldoc -f $env to find documentation on %ENV. no luck anyone??? perldoc perlvar -f is for builtin functions -- Just Another Perl Hacker.

Re: Gurus Wanted!!

2001-06-07 Thread John Joseph Trammell
On Thu, Jun 07, 2001 at 11:50:01PM +, scott lutz wrote: I have a this fancy bit of recursive search and replace code that I picked up somewhere, but I would greatly appreciate it if one of the gurus could explain it in English for me: find . -type f -print0 | xargs -0 perl -pi -e

Re: grep and regular exp.

2001-06-06 Thread John Joseph Trammell
On Wed, Jun 06, 2001 at 02:02:33PM -0500, David Blevins wrote: [snip] my @list1 = grep(/$year_$month_.*01\.txt/, @allFiles); my @list2 = grep(/$year_$month_.*01a\.txt/, @allFiles); [snip] These regexes look for variables $year_ and $month_. Let me guess -- you're not using warnings,

Re: ONE LINE PERL COMMAND

2001-06-04 Thread John Joseph Trammell
On Mon, Jun 04, 2001 at 11:46:00AM -0400, Pedro A Reche Gallardo wrote: Hi, please have a look to this perl one line command. perl -ne 'BEGIN{$/=}if(/^\s*(\S+)/){open(F,$1)|| warn$1 write failed:$!\n;chomp;print F , $_}' This command will take a file like this: name1: anything

Re: printf and other stuff

2001-06-01 Thread John Joseph Trammell
On Fri, Jun 01, 2001 at 03:05:59PM -0400, David Gilden wrote: [snip -- was there a question about '?:' ?] printf question-- ### get time my($sec, $min, $hour, $mday, $month, $year) = (localtime)[0..5]; $year += 1900; $mday = 0 . $mday if $mday 10; $month++; # perl counts from -1 on

Re: help with script

2001-05-30 Thread John Joseph Trammell
On Wed, May 30, 2001 at 03:57:44PM -0700, Peter Lemus wrote: Hi guys, I keep getting errors on the followin script. I need the script to logout all users other then root or ipl. 1 #!/usr/bin/perl 2 # 3 #Purpose: To logout users off the system during after hours. 4

Re: REVIEW: please review the following

2001-05-18 Thread John Joseph Trammell
On Fri, May 18, 2001 at 02:15:05PM -0400, Yacketta,Ronald J wrote: #!/usr/local/bin/perl #!/usr/local/bin/perl -w use strict; [snip] -- Never hit anyone with glasses. Instead, use your fist.

Re: Outputting content to the web

2001-05-01 Thread John Joseph Trammell
On Tue, May 01, 2001 at 11:28:02AM -0400, Dale Owens wrote: I am completely new to perl and this question may seem really lame, but I can't get the most basic script to work. I am trying to run this on my web host's server: #!usr/bin/perl print Content-type: text/html\n\n; print

Re: Help on Date Format

2001-04-24 Thread John Joseph Trammell
On Tue, Apr 24, 2001 at 01:09:13PM -0400, Kevin Meltzer wrote: Hi Susan, I get what you expect: perl -wle '$y=2001;$m=4;$d=5;printf(\%s%02s%02s.doc,$y,$m,$d)'; 20010405.doc [snip] Well I'll be damned. [ ~ ] perl -e 'printf %04s\n, 1' 0001 [ ~ ] perl -e 'printf %04s\n, 1' 0001 [ ~ ]