Re: rewriting a single column in an open file... more efficient IO

2011-05-10 Thread C.DeRykus
On May 10, 9:18 pm, u...@stemsystems.com ("Uri Guttman") wrote: > > "CD" == C DeRykus writes: > >   CD> On May 9, 1:29 pm, demianricca...@gmail.com (D) wrote: >   >> Hello everyone, >   >> >   >> I would like to learn an efficient way to change a single column in a >   >> file that is accessed

Re: rewriting a single column in an open file... more efficient IO

2011-05-10 Thread Uri Guttman
> "CD" == C DeRykus writes: CD> On May 9, 1:29 pm, demianricca...@gmail.com (D) wrote: >> Hello everyone, >> >> I would like to learn an efficient way to change a single column in a >> file that is accessed by an external program after the column is CD> the tie that you mentione

Re: rewriting a single column in an open file... more efficient IO

2011-05-10 Thread C.DeRykus
On May 9, 1:29 pm, demianricca...@gmail.com (D) wrote: > Hello everyone, > > I would like to learn an efficient way to change a single column in a > file that is accessed by an external program after the column is > changed each time.  open write close is what I have been using.  I > thought that t

Re: rewriting a single column in an open file... more efficient IO

2011-05-10 Thread Rob Dixon
On 09/05/2011 21:29, D wrote: Hello everyone, I would like to learn an efficient way to change a single column in a file that is accessed by an external program after the column is changed each time. open write close is what I have been using. I thought that tieing could help speed it up. Whi

Re: rewriting a single column in an open file... more efficient IO

2011-05-09 Thread Uri Guttman
> "DR" == Demian Riccardi writes: >> is the file well defined with white space separation? is the third field >> always the last field of non-whitespace?  is the value of the third >> field always 0 to start? is it always replaced by its line number? if >> those are all yes, then you

Re: rewriting a single column in an open file... more efficient IO

2011-05-09 Thread Demian Riccardi
> is the file well defined with white space separation? is the third field > always the last field of non-whitespace?  is the value of the third > field always 0 to start? is it always replaced by its line number? if > those are all yes, then you can do this and it will blow away your > example in

Re: rewriting a single column in an open file... more efficient IO

2011-05-09 Thread Uri Guttman
> "D" == D writes: D> I would like to learn an efficient way to change a single column in D> a file that is accessed by an external program after the column is D> changed each time. open write close is what I have been using. I D> thought that tieing could help speed it up. While

rewriting a single column in an open file... more efficient IO

2011-05-09 Thread D
Hello everyone, I would like to learn an efficient way to change a single column in a file that is accessed by an external program after the column is changed each time. open write close is what I have been using. I thought that tieing could help speed it up. While I didn't dig in too deeply, m

Re: Write Excel and Open file from CGI

2009-05-14 Thread Jim Gibson
On 5/13/09 Wed May 13, 2009 11:03 AM, "Vaishak" scribbled: > Hello List, > > > > > > I have a DOS batch file which has perl script that runs at the end. The perl > script fetches information from different files and database and generates > an excel file. Is there a way I can open the ex

RE: Write Excel and Open file from CGI

2009-05-14 Thread Taylor, Andrew (ASPIRE)
--Hello List, -- --I have a DOS batch file which has perl script that runs at the end. The --perl --script fetches information from different files and database and generates --an excel file. Is there a way I can open the excel from CGI and display on --screen? -- -- --Thanks -- --Vau # Print HTTP

Write Excel and Open file from CGI

2009-05-14 Thread Vaishak
Hello List, I have a DOS batch file which has perl script that runs at the end. The perl script fetches information from different files and database and generates an excel file. Is there a way I can open the excel from CGI and display on screen? Thanks Vau

Re: Cannot open file to read after creation

2008-12-03 Thread blake askew
Thanks again John, I really appreciate you helping me out. I am new to perl and still reading everything I can, but your explanations cleared a few things up. On Wed, Dec 3, 2008 at 9:39 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >> >> Thanks for the help. I have ma

Re: Cannot open file to read after creation

2008-12-03 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Thanks for the help. I have made the changes you suggested. Some were merely pointing out errors you made, hoping that you would be able to figure out the correct solution on your own. However, now the irc subroutine is always called. That is because you don't te

Re: Re: Cannot open file to read after creation

2008-12-03 Thread askew . blake
John, Thanks for the help. I have made the changes you suggested. However, now the irc subroutine is always called. For example, if I give the port as 80 and nmap identifies http running, it still calls the irc subroutine. It should only call the irc subroutine if nmap identifies the port a

Re: Cannot open file to read after creation

2008-12-03 Thread John W. Krahn
[EMAIL PROTECTED] wrote: I am working on a script to help find malicious traffic that takes the supplied ip and port from the user, does a number of checks (reverse dns, whois, banner grabbing, amap and nmap service fingerprinting), and then prints the results to a file. My intent is to quickly

Cannot open file to read after creation

2008-12-03 Thread askew . blake
I am working on a script to help find malicious traffic that takes the supplied ip and port from the user, does a number of checks (reverse dns, whois, banner grabbing, amap and nmap service fingerprinting), and then prints the results to a file. My intent is to quickly check blocked outbou

Re: Open File - Read Only

2007-09-28 Thread Paul Lalli
On Sep 27, 8:49 pm, [EMAIL PROTECTED] wrote: > I appreciate the response to the last question. I have scripts that I have > opened > files and they work. However, I am failing on opens now because the file is > read > only. What is the way to open a file read only. If you are trying to open the

Re: Open File - Read Only

2007-09-27 Thread Tom Phoenix
On 9/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am failing on opens now because the file is read only. What is the way > to open a file read only. Normally, it's done in the exact same way that you open any file that you don't explicitly intend to write to. What are you trying that's

Open File - Read Only

2007-09-27 Thread andrewmchorney
Hello I appreciate the response to the last question. I have scripts that I have opened files and they work. However, I am failing on opens now because the file is read only. What is the way to open a file read only. Andrew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

perl cannot open file which path contain chinese character?

2006-03-13 Thread zhao_bingfeng
$out) = @_;# $in is user specified, if I use a hard-coded path, its OK! print "$in\n"; open IN, "<$in" or $main->messageBox(-title => 'Error', -message => "Cannot open file \"$in\" to read: $!", -type => 'OK',

Re: Can't open file.

2005-12-06 Thread David Sudjiman
On Tue, 6 Dec 2005, John W. Krahn wrote: > An array in scalar context returns the number of elements in the array so if > @ARGV contains one file name then $filename will be assigned the number 1. > You want to do either: > > my $filename = shift @ARGV; > > Or: > > my ( $filename ) = @ARGV; I

Re: Can't open file.

2005-12-06 Thread Mohammed Shameer
ote: > Hi All, > > I try this script: > > #!/usr/bin/perl > > use strict; > use warnings; > > my $filename = @ARGV; > my $lines; > > #open FILE, "fred.txt" or die "Can't open foobar.txt : $!"; > open FILE, $filename or die "

Re: Can't open file.

2005-12-06 Thread John W. Krahn
David Sudjiman wrote: > Hi All, Hello, > I try this script: > > #!/usr/bin/perl > > use strict; > use warnings; > > my $filename = @ARGV; An array in scalar context returns the number of elements in the array so if @ARGV contains one file name then $filename will be assigned the number 1. You

Can't open file.

2005-12-06 Thread David Sudjiman
Hi All, I try this script: #!/usr/bin/perl use strict; use warnings; my $filename = @ARGV; my $lines; #open FILE, "fred.txt" or die "Can't open foobar.txt : $!"; open FILE, $filename or die "Can't open $filename : $!"; $lines = join '', ; p

Re: open file for read and append

2005-08-23 Thread Xavier Noria
On Aug 23, 2005, at 12:49, Muthukumar wrote: I have a script where I need to open a file, read from it sequentially, and append items to the file as I go along, continuing to read these items as I go. But seems I can't open the file for read and append at the same time. Does anyone have any i

Re: open file for read and append

2005-08-23 Thread Muthukumar
> > I have a script where I need to open a file, read from it > > sequentially, > > and append items to the file as I go along, continuing to read these > > items as I go. But seems I can't open the file for read and append at > > the same time. Does anyone have any ideas? > Is it possible to ope

Re: open file for read and append

2005-08-23 Thread Xavier Noria
On Aug 23, 2005, at 12:34, Dan Klose wrote: I have a script where I need to open a file, read from it sequentially, and append items to the file as I go along, continuing to read these items as I go. But seems I can't open the file for read and append at the same time. Does anyone have any ide

open file for read and append

2005-08-23 Thread Dan Klose
Hello, I have a script where I need to open a file, read from it sequentially, and append items to the file as I go along, continuing to read these items as I go. But seems I can't open the file for read and append at the same time. Does anyone have any ideas? Many thanks. -- Daniel Klose PhD

Re: open > file && s/ / /;

2005-07-28 Thread John W. Krahn
Brian Volk wrote: > >>From: John W. Krahn [mailto:[EMAIL PROTECTED] >> >># store the files to "edit" in @ARGV >>@ARGV = map { chomp; "$dir/$_" } ; >> >># set the in-place edit variable >># cannot be '' on Windows >>$^I = '.bak'; >> >># modify the files and save the originals with .bak extention >>

RE: open > file && s/ / /;

2005-07-28 Thread Brian Volk
> -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 27, 2005 3:47 PM > To: Perl Beginners > Subject: Re: open > file && s/ / /; > > > Brian Volk wrote: > > Hi all, > > Hello, > > > Can

Re: open > file && s/ / /;

2005-07-27 Thread John W. Krahn
Brian Volk wrote: > Hi all, Hello, > Can someone pls take a look at the script below and explain what I'm doing > wrong.. The script runs w/out errors but the substitution is not working.. > Hopefully the note below will be enough info.. > > I was able to print the file names that I wanted

open > file && s/ / /;

2005-07-27 Thread Brian Volk
Hi all, Can someone pls take a look at the script below and explain what I'm doing wrong.. The script runs w/out errors but the substitution is not working.. Hopefully the note below will be enough info.. I was able to print the file names that I wanted but once I tried to open the file and

RE: simple open file

2005-05-31 Thread Roberts Mr Richard L
try: open(LOGS, ">>$filename") or die "msg"; print LOGS "$subscriber \n"; close(LOGS); -Original Message- From: Manav Mathur [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 31, 2005 9:20 AM To: lance w; beginners@perl.org Subject: RE: simple open file

RE: simple open file

2005-05-31 Thread Manav Mathur
|-Original Message- |From: lance w [mailto:[EMAIL PROTECTED] |Sent: Tuesday, May 31, 2005 6:42 PM |To: beginners@perl.org |Subject: simple open file | | |Hello, |I'm trying to open (create if necessary) a file for APPEND, that will |serve as a log. The script I'm using will o

simple open file

2005-05-31 Thread lance w
Hello, I'm trying to open (create if necessary) a file for APPEND, that will serve as a log. The script I'm using will open a file, but fails to print anything to it. Any advice? my $filename = "open_file.txt"; open(APPEND, ">> $filename") or die "Couldn't open $filename for appendin

Re: open file failed

2005-05-25 Thread Jeff 'japhy' Pinyan
On May 26, bingfeng zhao said: On RedHat Linux, the perl complain "Inappropriate ioctl for device" when I use the following code to open a file: my $file = "./abc"; if ( open FN, $file ) { print "Cannot open the file: $!\n"; next; } Um, you're printing that message if the file DOES op

open file failed

2005-05-25 Thread bingfeng zhao
Good morning, afternoon, evening for perl enthusiasts of all over the world:)   On RedHat Linux, the perl complain "Inappropriate ioctl for device" when I use the following code to open a file: my $file = "./abc"; if ( open FN, $file ) {     print "Cannot open the file: $!\n"; next; }

RE: Open file with default application software on Windows ?

2004-10-07 Thread NYIMI Jose \(BMB\)
> -Original Message- > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 07, 2004 6:14 PM > To: [EMAIL PROTECTED] > Subject: RE: Open file with default application software on Windows ? > > > From: "NYIMI Jose \(BMB\)" <[

Re: Open file with default application software on Windows ?

2004-10-07 Thread Bee
> > > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > > > The system('start file.doc') only allows you to trigger the default > > > action defined for the file type. If you want to use the other > > > actions you might like use Win32::FileOp qw(ShellExecute); > > > ShellExecute 'Print' => 'c:\temp

RE: Open file with default application software on Windows ?

2004-10-07 Thread Jenda Krynicky
From: "NYIMI Jose \(BMB\)" <[EMAIL PROTECTED]> > > -Original Message- > > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > > The system('start file.doc') only allows you to trigger the default > > action defined for the file type. If you want to use the other > > actions you might like

RE: Open file with default application software on Windows ?

2004-10-07 Thread NYIMI Jose \(BMB\)
> -Original Message- > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 07, 2004 4:10 PM > To: [EMAIL PROTECTED] > Subject: Re: Open file with default application software on Windows ? > > > From: "Bee" <[EMAIL PROTECTED]&g

Re: Open file with default application software on Windows ?

2004-10-07 Thread David le Blanc
On Thu, 07 Oct 2004 16:10:29 +0200, Jenda Krynicky <[EMAIL PROTECTED]> wrote: > From: "Bee" <[EMAIL PROTECTED]> > > I am curious to know that if that is an existed module to open files > > with it's default application just like I double click on the file > > with mouse. and I do something just lik

Re: Open file with default application software on Windows ?

2004-10-07 Thread Jenda Krynicky
From: "Bee" <[EMAIL PROTECTED]> > I am curious to know that if that is an existed module to open files > with it's default application just like I double click on the file > with mouse. and I do something just like this with my code : > > use defaultOpen; > defOpen 'C:\temp.gif' or die "$!" ; # Th

Re: Open file with default application software on Windows ?

2004-10-07 Thread Bee
t;[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, October 07, 2004 8:24 PM Subject: RE: Open file with default application software on Windows ? > Bee wrote: > > Hello, > > > > I am curious to know that if that is an existed module to open files > >

RE: Open file with default application software on Windows ?

2004-10-07 Thread Bob Showalter
Bee wrote: > Hello, > > I am curious to know that if that is an existed module to open files > with it's default application just like I double click on the file > with mouse. and I do something just like this with my code : > > use defaultOpen; > defOpen 'C:\temp.gif' or die "$!" ; # Then the i

Re: Open file with default application software on Windows ?

2004-10-07 Thread Bee
Wow !! As you mentioned, thaz EXACTLY what I want :-)) Thousands Thanks !!! Bee - Original Message - From: "David le Blanc" <[EMAIL PROTECTED]> To: "Bee" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, October 07, 2004 7:11 PM Subject:

Re: Open file with default application software on Windows ?

2004-10-07 Thread David le Blanc
Search for a program called 'shellexec'. (use google). Shellexec does exactly what you want, but its a windows executable, so instead of calling defopen "something"; try system("shellexec something"); you should be able to download shellexec or an equivalent from many places. As for portable

Open file with default application software on Windows ?

2004-10-07 Thread Bee
Hello, I am curious to know that if that is an existed module to open files with it's default application just like I double click on the file with mouse. and I do something just like this with my code : use defaultOpen; defOpen 'C:\temp.gif' or die "$!" ; # Then the image will open with photos

Open file

2003-02-01 Thread [EMAIL PROTECTED]
Hi list, Sorry i'am a newbie of Perl. My problem is that I'll modifier a text file in silent mode with Perl. So I have a file for example pippo.txt with 100 line of words. My goals is to found a particular line of char with the first character # and erase it. (before I'll make a backup of all cha

Re: open file into hash

2002-08-19 Thread John W. Krahn
Wagner wrote: > > Hi, Hello, > Though this thread is now almost a week old, I thought I'd offer one more > suggestion. How about using this > > %people = map { chomp; split } ; > > in place of > > %people = ; > > To my eyes, it is cleaner than adding an explicit loop. The chom

RE: open file into hash

2002-08-19 Thread Wagner Jeff Civ Northrop Grumman/TTMS
From: Jose Malacara [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 2:35 AM To: Perl beginners Subject: open file into hash Hello. I was wondering if there was a way to open a file into a hash? I know this works for arrays, but was wondering if I this could be done for a hash also. I h

Re: open file into hash

2002-08-14 Thread John W. Krahn
Jose Malacara wrote: > > Hello. I was wondering if there was a way to open a file into a hash? I know > this works for arrays, but was wondering if I this could be done for a hash > also. > > I have a file called people.data, which contains two colums: > jose2 > karen 8 > j

Re: open file into hash

2002-08-14 Thread Jose Malacara
Thanks to all who replied with the useful advice. I really appreciate the help. Thanks! Jose - Original Message - From: "Tor Hildrum" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Perl" <[EMAIL PROTECTED]> Sent: Wednesday, August 14, 2002 3:

Re: open file into hash

2002-08-14 Thread Sudarshan Raghavan
On Wed, 14 Aug 2002, Andy Anderson wrote: > Hi: > > By first changing the % sign to a $ sign and then removing {jose} in the > print line I got it to work. I tested it in both Windows and Linux > environments with the same results. The % specifies that the identifier is a hash and the $ means i

Re: open file into hash

2002-08-14 Thread Andy Anderson
se Malacara" <[EMAIL PROTECTED]> To: "Perl beginners" <[EMAIL PROTECTED]> Sent: Wednesday, August 14, 2002 12:35 AM Subject: open file into hash Hello. I was wondering if there was a way to open a file into a hash? I know this works for arrays, but was wondering if I thi

Re: open file into hash

2002-08-14 Thread Felix Geerinckx
on Wed, 14 Aug 2002 07:35:29 GMT, [EMAIL PROTECTED] (Jose Malacara) wrote: > I have a file called people.data, which contains two colums: > jose 2 > karen 8 > jason 9 > tracey 1 > Can someone tell me what I am doing wrong here: > #! /usr/bin/perl -w > open (INPUT,

Re: open file into hash

2002-08-14 Thread Sudarshan Raghavan
On Wed, 14 Aug 2002, Jose Malacara wrote: > Hello. I was wondering if there was a way to open a file into a hash? I know > this works for arrays, but was wondering if I this could be done for a hash > also. > > I have a file called people.data, which contains two colums: > jose 2 > ka

Re: open file into hash

2002-08-14 Thread Tor Hildrum
<[EMAIL PROTECTED]> wrote: > I have a file called people.data, which contains two colums: > jose2 > karen8 > jason9 > tracey1 > > > Can someone tell me what I am doing wrong here: > = > #! /usr/bin/perl -w > > open (INPUT,

open file into hash

2002-08-14 Thread Jose Malacara
Hello. I was wondering if there was a way to open a file into a hash? I know this works for arrays, but was wondering if I this could be done for a hash also. I have a file called people.data, which contains two colums: jose2 karen 8 jason 9 tracey 1 Can someo

RE: Cant open file...

2002-04-03 Thread Timothy Johnson
Don't feel too bad. I wish I could reclaim the hours wasted by forgetting to escape backslashes. :P -Original Message- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 6:53 PM To: Timothy Johnson Cc: [EMAIL PROTECTED] Subject: RE: Cant open

Re: Cant open file...

2002-04-03 Thread Michael Kelly
On 4/3/02 6:47 PM, Daniel Falkenberg <[EMAIL PROTECTED]> wrote: > Well I think I have figured it out... > > The location of my file looked like this... > > $file = "c:\folder\folder\test.cgi"; > > Now this didn't work like this so I changed it to... > > $file = 'c:\folder\folder\test.cgi'; >

RE: Cant open file...

2002-04-03 Thread Daniel Falkenberg
Of coarse I had no problem with the linux box... :) -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, 4 April 2002 12:14 PM To: Daniel Falkenberg; Timothy Johnson Cc: [EMAIL PROTECTED] Subject: RE: Cant open file... Ah. There's your problem.

RE: Cant open file...

2002-04-03 Thread Timothy Johnson
know what you mean if you use forward slashes, so that might be easier to read. "c:/folder/folder/test.cgi". -Original Message- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 6:48 PM To: Timothy Johnson Cc: [EMAIL PROTECTED] Subject: RE: Cant op

Re: Cant open file...

2002-04-03 Thread Tanton Gibbs
D]> Sent: Wednesday, April 03, 2002 9:47 PM Subject: RE: Cant open file... > Well I think I have figured it out... > > The location of my file looked like this... > > $file = "c:\folder\folder\test.cgi"; > > Now this didn't work like this so I changed it t

RE: Cant open file...

2002-04-03 Thread Daniel Falkenberg
s long as it works :) Regards, Dan -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, 4 April 2002 11:30 AM To: Daniel Falkenberg; [EMAIL PROTECTED] Subject: RE: Cant open file... You really haven't given us much to go on, but I guess you might double-

RE: Cant open file...

2002-04-03 Thread Timothy Johnson
EMAIL PROTECTED] Subject: Cant open file... Hi all, Just wondering why this error message is appearing on my windows box. I can read the file okay on a Linux box but when I ported my program to the Windows box I am not receiving the following error message. I have set the permissions on the file the

Cant open file...

2002-04-03 Thread Daniel Falkenberg
Hi all, Just wondering why this error message is appearing on my windows box. I can read the file okay on a Linux box but when I ported my program to the Windows box I am not receiving the following error message. I have set the permissions on the file the full access to everyone (For testing p

Re: open(FILE, " ") question

2002-03-20 Thread Jenda Krynicky
le " should be INSIDE the subroutine, not outside, change the line above to my $file = $_[0] || die ("No file specified\n"); or my $file = $_[0] or die ("No file specified\n"); > open(FILE, "$file") || die("File could not be opened - $file\n

Re: open(FILE, " ") question

2002-03-20 Thread Agustin Rivera
Wednesday, March 20, 2002 1:52 PM Subject: open(FILE, " ") question Hi, I am very new to perl. I am writing a script that is supposed to open an html file and do some various tasks then later on it should print out the html file. I am having problems with one portion of it. I d

open(FILE, " ") question

2002-03-20 Thread Eric Preece
== # test use strict; my $file; my $HTML; sub testOpen { local (*FILE); # filehandle $file = $_[0] || die ("No file specified\n"); open(FILE, "$file") || die("File could not be opened - $file\n"); while () {

Re: open FILE, "+ (was :

2001-11-30 Thread Scott R. Godin
In article <002201c1796e$55b9fbe0$5947a9cb@nothing>, [EMAIL PROTECTED] (Leon) wrote: > - Original Message - > From: "Johnson, Shaunn" <[EMAIL PROTECTED]> > > open (FILE, "+ > I was just wondering, what is that + sign for. perldo

open FILE, "+ (was :

2001-11-29 Thread Leon
- Original Message - From: "Johnson, Shaunn" <[EMAIL PROTECTED]> > open (FILE, "+http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: How to close ALL open file descriptors

2001-08-24 Thread HOLLAND-MORITZ,MARCUS (A-hsgGermany,ex1)
ope this helps, -- Marcus | -Original Message- | From: Gupta, Ashish [mailto:[EMAIL PROTECTED]] | Sent: Friday, August 24, 2001 2:21 AM | To: '[EMAIL PROTECTED]' | Subject: How to close ALL open file descriptors | | | I open lots of file descriptors in a scr

Re: How to close ALL open file descriptors

2001-08-24 Thread Troy Denkinger
On Thursday 23 August 2001 20:20, Gupta, Ashish wrote: > I open lots of file descriptors in a script. > At one point, I want to close all the opened file descriptors (except for > stdin, stdout, stderr). > Is there a way to close all the opened file descriptors without having a > list of the hand

How to close ALL open file descriptors

2001-08-23 Thread Gupta, Ashish
I open lots of file descriptors in a script. At one point, I want to close all the opened file descriptors (except for stdin, stdout, stderr). Is there a way to close all the opened file descriptors without having a list of the handles ? ***

Re: OPEN file

2001-07-13 Thread Brett W. McCoy
On Fri, 13 Jul 2001, Assaf Spanier wrote: > Hi I'm trying to replace the string 'aaa' to 'bbb' in my files > the fallowing scrip DO NOT do the job, If anyone can tell me > where is my mistake, I will be grateful. > > --- > !/usr/bin/perl -w > > > open OUT, "+ > while () {

OPEN file

2001-07-13 Thread Assaf Spanier
Hi I'm trying to replace the string 'aaa' to 'bbb' in my files the fallowing scrip DO NOT do the job, If anyone can tell me where is my mistake, I will be grateful. --- !/usr/bin/perl -w open OUT, "+) { $_ =~ s/aaa/bbb/g; } close OUT;

Re: open FILE problem

2001-07-12 Thread Paul
--- Jennifer Pan <[EMAIL PROTECTED]> wrote: > Hello all, I came across this problem opening up files that are fed > in from command line using "ls". I do not know why this script did not > work. Appreciated any input. > > #!/usr/local/bin/perl > > # I am trying to feed all the files in this d

Re: open FILE problem

2001-07-12 Thread Chris Garringer
ls format is OS dependant. On Solaris ls returns a multiple column list, so the first line would be multiple filenames. Chris D. Garringer LAN/WAN Manager Master Certified Netware Engineer Microsoft Certified Systems Engineer Certified Solaris Administrator Red Hat Certified Engineer [EMAIL PROT

RE: open FILE problem

2001-07-12 Thread Mooney Christophe-CMOONEY1
In your die command, say: die "cannot open $LINE: $!\n"; This will give you a hint as to what's going wrong. -Original Message- From: Maxim Berlin [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 11:51 AM To: [EMAIL PROTECTED] Subject: Re: open FILE problem

RE: open FILE problem

2001-07-12 Thread Wagner-David
[mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 09:33 To: [EMAIL PROTECTED] Subject: open FILE problem Hello all, I came across this problem opening up files that are fed in from command line using "ls". I do not know why this script did not work. Appreciated any input. #!

Re: open FILE problem

2001-07-12 Thread Maxim Berlin
Hello Jennifer, Thursday, July 12, 2001, Jennifer Pan <[EMAIL PROTECTED]> wrote: JP> Hello all, I came across this problem opening up files that are fed in JP> from command line using "ls". I do not know why this script did not JP> work. Appreciated any input. [...] JP> at prompt I typed JP>

open FILE problem

2001-07-12 Thread Jennifer Pan
Hello all, I came across this problem opening up files that are fed in from command line using "ls". I do not know why this script did not work. Appreciated any input. #!/usr/local/bin/perl # I am trying to feed all the files in this directory to do text processing and save the processed txt i

RE: open file, find lines and print to a second file....

2001-05-01 Thread Paul
--- "McCormick, Rob E" <[EMAIL PROTECTED]> wrote: > > print RESULT grep { ! /_vti_cnf/ } ; > > # so that could be read as print to the output filehandle the result > of the input file handle filtered by grep. Exactly, and because grep is a list context, the one statement prints the entire s

Re: open file, find lines and print to a second file....

2001-05-01 Thread Gil Tucker [ateliermobile]
hello world - Original Message - From: McCormick, Rob E <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 30, 2001 11:10 PM Subject: open file, find lines and print to a second file > gang, > > # problem: open a file > # find lin

RE: open file, find lines and print to a second file....

2001-04-30 Thread McCormick, Rob E
print RESULT grep { ! /_vti_cnf/ } ; # so that could be read as print to the output filehandle the result of the input file handle filtered by grep. wow - pretty concise line thereworks well. I'll need to look up $0 (perldoc perlvar: Contains the name of the file containing the Perl

RE: open file, find lines and print to a second file....

2001-04-30 Thread J. Patrick Lanigan
){ print RESULT $_ unless grep {/_vti_cnf/} $_; } close INFO; close RESULT; Hope this works for ya.. Patrick > -Original Message- > From: McCormick, Rob E [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 30, 2001 5:01 PM > To: '[EMAIL PROTECTED]' > Subject: RE:

Re: open file, find lines and print to a second file....

2001-04-30 Thread Paul
--- "McCormick, Rob E" <[EMAIL PROTECTED]> wrote: > gang, > > # problem: open a file > # find lines that meet a condition, put them in an output file > > Could you share some patterns/sample code that you use to accomplish > this task? What pattern do you use when the output file doesn't exis

RE: open file, find lines and print to a second file....

2001-04-30 Thread McCormick, Rob E
t; To: McCormick, Rob E > Cc: '[EMAIL PROTECTED]' > Subject: Re: open file, find lines and print to a second file > > I'm not sure what you mean by your last question (what pattern do you > use when the output file...). > > The error is due to the fact tha

Re: open file, find lines and print to a second file....

2001-04-30 Thread Dan Brown
I'm not sure what you mean by your last question (what pattern do you use when the output file...). The error is due to the fact that outside of quotes the > is an operator (greater than). Try open( RESULT, ">$outfile" ) or die "$!"; With the single greater than ">" the output file wil

open file, find lines and print to a second file....

2001-04-30 Thread McCormick, Rob E
gang, # problem: open a file # find lines that meet a condition, put them in an output file Could you share some patterns/sample code that you use to accomplish this task? What pattern do you use when the output file doesn't exist when the script begins? The code below errors with: C:\WINNT\P