Re: Splitting a path

2003-08-02 Thread Steve Grazzini
On Sat, Aug 02, 2003 at 03:20:14PM -0700, Gupta, Sharad wrote: > From: Casey West [mailto:[EMAIL PROTECTED] >> It was Saturday, August 02, 2003 when Gupta, Sharad took the soap box, saying: >> : >> : Hi, >> : >> : I have a path which may look like: >> >> use Env [EMAIL PROTECTED]; >> >> pri

Re: Uploading files

2003-08-02 Thread Mark Stosberg
In article <[EMAIL PROTECTED]>, Li Ngok Lam wrote: > > - Original Message - > From: "K. Parker" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, August 02, 2003 12:00 PM > Subject: Uploading files > > >> On a site I'm developing, I'm trying to create a script that uploads

Re: What systems using "\r\n" and what systems using "\n" etc ?

2003-08-02 Thread Mark Stosberg
In article <[EMAIL PROTECTED]>, LI NGOK LAM wrote: > --=_NextPart_000_002B_01C353EC.615A7010 > Content-Type: text/plain; > charset="big5" > Content-Transfer-Encoding: quoted-printable > > Is that any module can help to detect what is the right new line = > declaration for the=20 > curren

Re: Splitting a path

2003-08-02 Thread Wiggins d'Anconia
Sorry missed a parenthesis. It would be nice if I had some way to paste from an X windows terminal from fink into a aqua app :-) Wiggins d'Anconia wrote: Gupta, Sharad wrote: I miscommunicated here, by path i did'nt meant the PATH env variable. By Path i meant any string having some direct

Re: Splitting a path

2003-08-02 Thread Wiggins d'Anconia
Gupta, Sharad wrote: I miscommunicated here, by path i did'nt meant the PATH env variable. By Path i meant any string having some directories seperated by ":" , say it could be FOO=E:\foo:D:\bar. And yes it can be in the %ENV. -Sharad How about: my @paths = split(/:(?!\\)/, $path; perldoc per

RE: Splitting a path

2003-08-02 Thread Gupta, Sharad
I miscommunicated here, by path i did'nt meant the PATH env variable. By Path i meant any string having some directories seperated by ":" , say it could be FOO=E:\foo:D:\bar. And yes it can be in the %ENV. -Sharad -Original Message- From: Casey West [mailto:[EMAIL PROTECTED] Sent: Sa

Re: Splitting a path

2003-08-02 Thread Casey West
It was Saturday, August 02, 2003 when Gupta, Sharad took the soap box, saying: : : Hi, : : I have a path which may look like: use Env [EMAIL PROTECTED]; print "$_\n" foreach @PATH; I love the Perl core. :-) For more information read http://search.cpan.org/perldoc?Env Casey West -- S

Splitting a path

2003-08-02 Thread Gupta, Sharad
Hi, I have a path which may look like: UNIX: - PATH=/usr/local/share:/usr/local:... Where each path is seperated by ":". Windows: -- PATH=E:\foo:D:\bar Again the path seperated by ":". ( I cannot change the seperator ) How can i split the path on ":" which gives m

RE: c compiler needs....disregard

2003-08-02 Thread Hodge, Jeff F (ECIII)
Please disregard. tks -jh -Original Message- From: Hodge, Jeff F (ECIII) [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 2:33 PM To: '[EMAIL PROTECTED]' Subject: c compiler needs while config-ing perl 5.8.0 with sh Configure -Accflags="-DPERL_Y2KWARN -DPERL_POLLUTE_MALLOC"

c compiler needs

2003-08-02 Thread Hodge, Jeff F (ECIII)
while config-ing perl 5.8.0 with sh Configure -Accflags="-DPERL_Y2KWARN -DPERL_POLLUTE_MALLOC" I am getting an error that I need a C compiler...but I have gcc installed through SuSe 8.0 linux... What's the deal?

Re: deleting files from the directory from a file list. Please Help!

2003-08-02 Thread R. Joseph Newton
perlwannabe wrote: > > Not at all. I am checking various sources for this problem. The > responses on the usenet were helpful...but the problem remains. I came to > the mailing list to have a direct dialogue with individuals rather than a > post that will get lost in two days. I am appreciativ

[ot: "test"] Re: use lib problem

2003-08-02 Thread Randal L. Schwartz
> "Jeff" == Jeff 'Japhy' Pinyan <[EMAIL PROTECTED]> writes: Jeff> On Aug 2, awarsd said: >> #!/usr/bin/perl >> >> use CGI qw(:standard); >> use DBI; >> >> require "/path/to/config.pl"; >> ##inside config.pl it has $dataDir >> ##$dataDir = "/path/to/"; >> use lib $dataDir."Module"; >> use Tes

Re: use lib problem

2003-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, awarsd said: >#!/usr/bin/perl > >use CGI qw(:standard); >use DBI; > >require "/path/to/config.pl"; > ##inside config.pl it has $dataDir >##$dataDir = "/path/to/"; >use lib $dataDir."Module"; >use Test; You named your module "Test"? That's why you're getting a false positive. There's a

Re: use lib problem

2003-08-02 Thread awarsd
Hi, here is the actual top of the file #!/usr/bin/perl use CGI qw(:standard); use DBI; require "/path/to/config.pl"; ##inside config.pl it has $dataDir ##$dataDir = "/path/to/"; use lib $dataDir."Module"; use Test; ... Should I declare variable i.e my $datDir inside the program or in

Re: use lib problem

2003-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, awarsd said: >no sorry it is not use but use lib $datadir."Module"; That doesn't change the fact that $datadir does NOT have a value when the 'use' line happens. Is the require() being done in a BEGIN block? If so, you neglected to show us that as well. -- Jeff "japhy" Pinyan [

Re: use lib problem

2003-08-02 Thread awarsd
Hi, no sorry it is not use but use lib $datadir."Module"; just a typo awards "Jeff 'Japhy' Pinyan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Aug 2, awarsd said: > > >I messed around and found that > >if in config i do $datadir = "/my/path/"; > >instead o f$datadir= "/my/pa

Re: use lib problem

2003-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, awarsd said: >I messed around and found that >if in config i do $datadir = "/my/path/"; >instead o f$datadir= "/my/path"; > >then in my script i do >#!/usr/bin/perl >require 'config.pl'; >use $datadir."Module"; > >everything works again. I don't know how "everything works". You haven't

Re: use lib problem

2003-08-02 Thread awarsd
Hi, I messed around and found that if in config i do $datadir = "/my/path/"; instead o f$datadir= "/my/path"; then in my script i do #!/usr/bin/perl require 'config.pl'; use $datadir."Module"; everything works again. Thanx for the suggestion tough because i didn't know how to use BEGIN now i do

Re: use lib problem

2003-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, awarsd said: >use lib "/path/to/Module"; >it works just fine >with $dir = '/path/to'; >use lib "$dir/Module"; >it give me an error I also tried use lib qw() but same problem is there a >way to fix the problem?? The problem is that 'use' is a compile-time directive, whereas assigning a

Re: use lib problem

2003-08-02 Thread Li Ngok Lam
- Original Message - From: "awarsd" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 02, 2003 10:01 PM Subject: use lib problem > Hi, > > I have a problem maybe it is normal. > My problem is with using lib > now to retrieve my module i do this > use lib "/path/to/Modul

Re: Uploading files

2003-08-02 Thread Li Ngok Lam
- Original Message - From: "K. Parker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 02, 2003 12:00 PM Subject: Uploading files > On a site I'm developing, I'm trying to create a script that uploads > encrypted files and saves them in a particular directory. You wi

use lib problem

2003-08-02 Thread awarsd
Hi, I have a problem maybe it is normal. My problem is with using lib now to retrieve my module i do this use lib "/path/to/Module"; it works just fine but created a configuration file. with $dir = '/path/to'; and when i do use lib "$dir/Module"; it give me an error I also tried use lib qw() but s

Re: regex grep andING search words together

2003-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, Alan C. said: >#!/perl/bin/perl -w >use strict; >#map & join from @ARGV into $pattern snipped >my $pattern='(?=.*doc)(?=.*sort)'; >#print "$pattern"; >#directory files foreach file to be searched snipped >if (s/^H=($pattern)/$1/io) { > print "$fil:$_" ; > } >#end >In the map a

Re: passing variable to module

2003-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, awarsd said: >now let say we have in config.pl >$passvar = ' test'; > >To use the variable in my module 'Test', should I do >$::passvar or $main::passvar? Both of them refer to $main::passvar, so either would work. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.co

passing variable to module

2003-08-02 Thread awarsd
Hi, I currently have a script that has all the password and path for my scripts. and I have module that uses them. i.e #!/usr/bin/perl ## script.pl <-- name of script require 'config.pl'; use lib '/home/site/module'; use Test; --- now let say we have in config.pl $passvar = ' test'; To use t

regex grep andING search words together

2003-08-02 Thread Alan C.
Hi, #!/perl/bin/perl -w use strict; #map & join from @ARGV into $pattern snipped my $pattern='(?=.*doc)(?=.*sort)'; #print "$pattern"; #directory files foreach file to be searched snipped if (s/^H=($pattern)/$1/io) { print "$fil:$_" ; } #end The above with the rest of my script finds doc

Uploading files

2003-08-02 Thread K. Parker
On a site I'm developing, I'm trying to create a script that uploads encrypted files and saves them in a particular directory. While the CGI mod had documentation about how to get an upload field up, I don't know how to actually upload the file entered by a user and save it in "Uploaded_Files/".