[Perl-unix-users] need qw help

2001-10-25 Thread Craig Sharp

Hi all,



I have the following short script that does not work:



#!/usr/bin/perl



@pvlist = qw{

/dev/dsk/c0t9d0

/dev/dsk/c0t10d0

/dev/dsk/c0t11d0

};



foreach (@pvlist) {



print "$_\n";



}



I am getting the following error:



syntax error in file pvcfg at line 3, next 2 tokens "qw{"



What am I doing wrong?  I need to eventually be able to read each line from the list 
and process it with a system call.  The foreach is just a test.



Thanks,



Craig



___
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users



RE: [Perl-unix-users] need qw help

2001-10-25 Thread Fay Jason-W13246

I copy and pasted what you sent, and it works fine for me.  Strange?!!?



Jason

-Original Message-
From: Craig Sharp [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, October 25, 2001 10:49 AM
To: [EMAIL PROTECTED]
Subject: [Perl-unix-users] need qw help

Hi all,





I have the following short script that does not work:





#!/usr/bin/perl





@pvlist = qw{


/dev/dsk/c0t9d0


/dev/dsk/c0t10d0


/dev/dsk/c0t11d0


};





foreach (@pvlist) {





print "$_\n";





}





I am getting the following error:





syntax error in file pvcfg at line 3, next 2 tokens "qw{"





What am I doing wrong?  I need to eventually be able to read each line from
the list and process it with a system call.  The foreach is just a test.





Thanks,





Craig





___
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users
___
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users



[Perl-unix-users] Update: need qw help

2001-10-25 Thread Craig Sharp

I tried running the script in Linux on perl v5.6.0.  Runs fine.



The script will actually be run on hpux with perl v5.6.0.  There the script will not 
run.  I get the syntax error.



How about that for a wrench in the works?



Craig



___
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users



[Perl-unix-users] Directory size

2001-10-25 Thread Nikko Odiseos


I need to determine the size of a directory with potentially hundreds of
thousand of files.  Ideally needs to work on both nt and unix.  Should be
easy but I am struggling.  Any ideas?

Thanks,

Nikko

___
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users



Re: [Perl-unix-users] Directory size

2001-10-25 Thread $Bill Luebkert

Nikko Odiseos wrote:
> 
> I need to determine the size of a directory with potentially hundreds of
> thousand of files.  Ideally needs to work on both nt and unix.  Should be
> easy but I am struggling.  Any ideas?

The safest (may not be most efficient) would be to use File::Find 
and stat each file and add to a vrbl.  You can prune if you don't 
want to recurse into the subdirs.

-- 
  ,-/-  __  _  _ $Bill Luebkert   ICQ=14439852
 (_/   /  )// //   DBE Collectibles   Mailto:[EMAIL PROTECTED] 
  / ) /--<  o // //  http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_http://www.todbe.com/
___
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users



RE: [Perl-unix-users] Directory size

2001-10-25 Thread Salah, Yahya A

In Unix; the Perl line of code you need is:

system("/usr/bin/du -ks $directory_name");

The size is in Kilobytes and it is recursive.
I am not sure about NT.
Regards

-Original Message-
From: Nikko Odiseos [mailto:[EMAIL PROTECTED]]
Sent: Friday, 26 October 2001 13:03
To: [EMAIL PROTECTED]
Subject: [Perl-unix-users] Directory size



I need to determine the size of a directory with potentially hundreds of
thousand of files.  Ideally needs to work on both nt and unix.  Should be
easy but I am struggling.  Any ideas?

Thanks,

Nikko

___
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users
___
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users



[Perl-unix-users] FW: [CGI] questions

2001-10-25 Thread Benjamin Eagle



> -Original Message-
> From: Benjamin Eagle [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2001 11:45 PM
> To:   [EMAIL PROTECTED]
> Subject:  [CGI] questions
> 
> 
>   [Benjamin Eagle]  I have a couple questionsremmeber I am new
> to cgi
> 
>   to create a script  to produse a html documentall I have to
> do is
> 
>   #!/usr/bin/perl -w
> 
>   print <   Content-type: text/html
> 
>   
>   
>   
> 
>   
>   
> 
>   ENDOFTEXT
> 
> 
> 
>   and it should work right??
> 
> 
> 
>   and another question...if I have a array in javascript on one
> page...and I need to pass values to another page (different IP) but
> same
> server)   how would I go about doing so?
> -
> The CGI-LIST is sponsored by:
> DINNERBROKER.com!
> Fine dining up to 30% off!
> Exclusive access to tables!
> http://www.dinnerbroker.com/
> 
> This is the cgi-list mailing list:
> To unsubscribe, send email to:
> [EMAIL PROTECTED]
> with the body:
> unsubscribe cgi-list
> 
> No one may in any way attempt to data-mine or archive the
> mailing list for financial gain without the express permission
> of Jann.com.
___
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users