Re: Open and perl sub

2019-08-08 Thread Shlomi Fish
Hi Mike, On Thu, 8 Aug 2019 15:40:42 +0100 Mike Martin via beginners wrote: > Is it possible to have the output of a perl module piped to open (open3 in > my case), so I can use a file handle contains the output passed to sysread > > Odd question I know > you can use https://en.wikipedia.org/

Re: open bug?

2011-12-08 Thread Tessio Fechine
2011/12/8 John W. Krahn > Tessio Fechine wrote: > >> Hello, >> > > Hello, > > I have a perl script that uses Net::LDAP to query an directory service. It >> is invoked like this: >> >> --- >> search.pl '(cn=peter*)' >> --- >> >> Today I started another perl script that works on top of search.pl.

Re: open bug?

2011-12-08 Thread Tessio Fechine
2011/12/8 Shlomi Fish > On Thu, 8 Dec 2011 16:42:45 -0300 > Tessio Fechine wrote: > > > Hello, > > I have a perl script that uses Net::LDAP to query an directory service. > It > > is invoked like this: > > > > --- > > search.pl '(cn=peter*)' > > --- > > > > Today I started another perl script th

Re: open bug?

2011-12-08 Thread John W. Krahn
Tessio Fechine wrote: Hello, Hello, I have a perl script that uses Net::LDAP to query an directory service. It is invoked like this: --- search.pl '(cn=peter*)' --- Today I started another perl script that works on top of search.pl. It opens search.pl with a piped open, and them process the

Re: open bug?

2011-12-08 Thread Shlomi Fish
On Thu, 8 Dec 2011 16:42:45 -0300 Tessio Fechine wrote: > Hello, > I have a perl script that uses Net::LDAP to query an directory service. It > is invoked like this: > > --- > search.pl '(cn=peter*)' > --- > > Today I started another perl script that works on top of search.pl. It > opens search

Re: open files in a directory

2011-08-01 Thread Shlomi Fish
Hi John, a few comments on your code (some of which was derived from the OP's). On Mon, 01 Aug 2011 00:26:29 -0700 "John W. Krahn" wrote: > homedw wrote: > > hi all, > > Hello, > > > > i want to open some files in a directory, you can see the details below, > > > > #!/usr/bin/perl -w > > use

Re: open files in a directory

2011-08-01 Thread timothy adigun
Hi Jack, Your code should work fine except for d following: 1. your $sum used in the while loop is out of scope i.e declare it before your first for loop, and intialize to zero. As u have it in your code. The last print statement will print nothing 'cos $sum is out of reach, so u see nonthing!

Re: open files in a directory

2011-08-01 Thread timothy adigun
Hi Jack, Your code should work fine except for d following: 1. your $sum used in the while loop is out of scope i.e declare it before your first for loop, and intialize to zero. As u have it in your code. The last print statement will print nothing 'cos $sum is out of reach, so u see nonthing!

Re: open files in a directory

2011-08-01 Thread Emeka
I guess that $sum should be "my $sum" before using it. Emeka On Mon, Aug 1, 2011 at 8:26 AM, John W. Krahn wrote: > homedw wrote: > >> hi all, >> > > Hello, > > > > i want to open some tha files in a directory, you can see the details >> below, >> >> #!/usr/bin/perl -w >> use strict; >> opendi

Re: open files in a directory

2011-08-01 Thread John W. Krahn
homedw wrote: hi all, Hello, i want to open some files in a directory, you can see the details below, #!/usr/bin/perl -w use strict; opendir (FH,'C:\Player'); chdir 'C:\Player'; for my $file(readdir FH) { open DH,"$file"; foreach my $line() { whil

Re: Open existing HTML page from perl script

2011-05-05 Thread Rob Dixon
On 05/05/2011 08:31, Geospectrum wrote: > > I am putting together a simple website and would like visitors to be > able to type a number into a form (say 1234) and a perl script should > run open an existing page called .../1234.html or generate an error > page if the use enters a wrong number.

Re: Open existing HTML page from perl script

2011-05-05 Thread Jeff Pang
2011/5/5 Geospectrum : > Hi, > > I am putting together a simple website and would like visitors to be > able to type a number into a form (say 1234) and a perl script should > run open an existing page called .../1234.html  or generate an error > page if the use enters a wrong number.  I will have

RE: open program

2008-09-08 Thread V.Ramkumar
>>I am trying to open Internet explorer from within Perl.I have used the >>following code: You cau use like this: system ("start iexplore \"www.google.com\""); System ("start iexplore"); Regards, Ramkumar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: open program

2008-09-08 Thread Jeff Pang
2008/9/8 Jeff Pang <[EMAIL PROTECTED]>: > 2008/9/8 Adams Paul <[EMAIL PROTECTED]>: >> #!/usr/bin/perl;open(MYFILE,"C:\Program Files\Internet Explorer.exe"); > > If you call an external program in Perl, shouldn't use "open". adjust: I mean shouldn't use open directly like this way. but you could op

Re: open program

2008-09-08 Thread Jeff Pang
2008/9/8 Adams Paul <[EMAIL PROTECTED]>: > > I am trying to open Internet explorer from within Perl.I have used the > following code: > > > > #!/usr/bin/perl;open(MYFILE,"C:\Program Files\Internet Explorer.exe"); If you call an external program in Perl, shouldn't use "open". Instead you could say

Re: open and close a filehandle

2008-01-10 Thread Rob Dixon
Kevin Viel wrote: I have a file with thousands of fields, but a subsequent program can only had 3000. I have to break this file up, for simplicity: 1-03000 03001-06000 Hopefully, a basic outline of my code will suffice to get informative advice. my $cnt = -1 ; my $subset = 1 ; foreach (

RE: open and close a filehandle

2008-01-10 Thread Kevin Viel
> -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 10, 2008 8:26 AM > To: Perl Beginners > Subject: Re: open and close a filehandle > > Kevin Viel wrote: > > I have a file with thousands of fields, but a subsequent

Re: open and close a filehandle

2008-01-10 Thread Chas. Owens
On Jan 10, 2008 9:26 AM, John W. Krahn <[EMAIL PROTECTED]> wrote: snip > > if ( $cnt = 0 ) { > > You are assigning 0 to $cnt so $cnt will always be false and the else > block will always execute. snip This is one of the reasons the warnings and strict pragmas are so important. The warnings prag

Re: open and close a filehandle

2008-01-10 Thread Stephen Kratzer
On Wednesday 09 January 2008 18:03:37 you wrote: > I have a file with thousands of fields, but a subsequent program can only > had 3000. I have to break this file up, for simplicity: > > 1-03000 > 03001-06000 > > Hopefully, a basic outline of my code will suffice to get informative > advice. >

Re: open and close a filehandle

2008-01-10 Thread John W. Krahn
Kevin Viel wrote: I have a file with thousands of fields, but a subsequent program can only had 3000. I have to break this file up, for simplicity: 1-03000 03001-06000 Hopefully, a basic outline of my code will suffice to get informative advice. my $cnt = -1 ; my $subset = 1 ; foreach (

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

Re: Open files and looking a word

2007-08-31 Thread Chas Owens
On 8/31/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote: > Hello, > > I'm doing a script, it run a ping in many computers > and create a log file. > > I need search in log file the word "Destination Host > Unreachable". So, I have to take below line. After > using regular expressions taking ferrari.

Re: Open() and glob EXPR

2007-05-02 Thread Somu
Ok i got that.. I also checked the perldoc -f q -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Open() and glob EXPR

2007-04-28 Thread Jay Savage
On 4/28/07, Somu <[EMAIL PROTECTED]> wrote: Thank you all.. Now i'm able to open files from other drives and directories.. The EXPR in glob EXPR is actually a kind of regexp then? What is this new q{} operator? I am sorry for the previous dubious emails, they actually were errors made by the ma

Re: Open() and glob EXPR

2007-04-28 Thread Somu
Thank you all.. Now i'm able to open files from other drives and directories.. The EXPR in glob EXPR is actually a kind of regexp then? What is this new q{} operator? I am sorry for the previous dubious emails, they actually were errors made by the mail sender. -- To unsubscribe, e-mail: [EMAIL

Re: Open() and glob EXPR

2007-04-28 Thread Dr.Ruud
"Rodrick Brown" schreef: > my @files = glob("*.*"); The glob() also returns directory names, so maybe @names is a better name for that variable. With "*.*", all names are left out that start with a dot, or that contain no dot at all. Try: perl -wle 'print for glob q{.* *}' -- Affijn, Ruud

Re: Open() and glob EXPR

2007-04-27 Thread Chas Owens
On 4/27/07, Somu <[EMAIL PROTECTED]> wrote: snip My next question is regarding opening pipes. I tried the following: open ( FH , " notepad " ); print FH 'hello' ; But its only opening the notepad application, and nothing shows up on the notepad.. snip I fear that you are trying to open the

Re: Open() and glob EXPR

2007-04-27 Thread Jay Savage
Please don't top post. On 4/27/07, Somu <[EMAIL PROTECTED]> wrote: Please give me one simple example using glob.. I saw the perlopentut, and perldoc -f open, and perldoc -f glob, but i am unable to make out anything from them.. I know only how to open files which are in the same dir or child dir

Re: Open() and glob EXPR

2007-04-27 Thread Rodrick Brown
On 4/27/07, Somu <[EMAIL PROTECTED]> wrote: Please give me one simple example using glob.. I saw the perlopentut, and perldoc -f open, and perldoc -f glob, but i am unable to make out anything from them.. I know only how to open files which are in the same dir or child dir.. But suppose i am in d

Re: Open() and glob EXPR

2007-04-27 Thread Somu
Please give me one simple example using glob.. I saw the perlopentut, and perldoc -f open, and perldoc -f glob, but i am unable to make out anything from them.. I know only how to open files which are in the same dir or child dir.. But suppose i am in dir D:/Scripts/Test and i want to open another

Re: Open() and glob EXPR

2007-04-26 Thread John W. Krahn
Somu wrote: > I'm not certain about what EXPR is.. EXPR is any valid Perl expression. > How do i use glob? perldoc -f glob perldoc File::Glob > My next question is regarding opening pipes. I tried the following: > open ( FH , " notepad " ); > print FH 'hello' ; | is the pipe character so somet

Re: Open() and glob EXPR

2007-04-26 Thread Jeff Pang
open FH,">","notepad" or die $!; # create a new file open FH,">>","notepad" or die $!; # append to a file,if not exists,then create one see "perldoc -f open". 2007/4/27, Somu <[EMAIL PROTECTED]>: I'm not certain about what EXPR is.. How do i use glob? My next question is regarding opening pi

Re: open()

2006-10-27 Thread Tom Phoenix
On 10/27/06, Klaus Jantzen <[EMAIL PROTECTED]> wrote: Why should one separate the ">" etc. from the file name? Mostly, if the file name might be user-supplied. Perl's open() treats a number of characters as magical, potentially invoking a shell or another program -- but that's dangerous power

Re: Open source IDE for Perl

2005-12-03 Thread Randal L. Schwartz
> "Andrej" == Andrej Kastrin <[EMAIL PROTECTED]> writes: Andrej> Dear all, Andrej> which is yours "best" open source IDE for Perl. I use SciTE under Andrej> Linux, but I'm a little confused on Windows. Which do you prefer? GNU Emacs. Runs fine on Unix, Windows, Darwin, etc. -- Randal L. Sc

RE: Open source IDE for Perl

2005-11-30 Thread Thomas Bätzler
Andrej Kastrin <[EMAIL PROTECTED]> asked: > And how to compile and execure Perl code on TextPad; have you > any link or tutorial? Just add perl.exe als a program in the Extras configuration section. If you delete the predefined entries for Java in there, you can run the Perl script in the current

RE: Open source IDE for Perl

2005-11-30 Thread Cintron, Jose J.
Try Open Perl IDE http://open-perl-ide.sourceforge.net/ +-- | José J. Cintrón +-- > -Original Message- > > which is yours "best" open source IDE for Perl. I use SciTE under > > Linux, but I'm a little confu

Re: Open source IDE for Perl

2005-11-30 Thread The Ghost
which is yours "best" open source IDE for Perl. I use SciTE under Linux, but I'm a little confused on Windows. Which do you prefer? I always suggest jEdit: http://jedit.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Open source IDE for Perl

2005-11-30 Thread Octavian Rasnita
> > >I use TextPad. > > > >Teddy > > > > > > > > > And how to compile and execure Perl code on TextPad; have you any link > or tutorial? > It is simple to configure TextPad to create menus that allow running the current perl file. You can also define hotkeys for those menu items, you can run the p

Re: Open source IDE for Perl

2005-11-30 Thread Dan Klose
> Dear all, > which is yours "best" open source IDE for Perl. I use SciTE under Linux, > but I'm a little confused on Windows. Which do you prefer? > >>Best, Andrej I use emacs on Mac, Linux and Windows. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: Open source IDE for Perl

2005-11-30 Thread Andrej Kastrin
Octavian Rasnita wrote: From: "Andrej Kastrin" <[EMAIL PROTECTED]> Dear all, which is yours "best" open source IDE for Perl. I use SciTE under Linux, but I'm a little confused on Windows. Which do you prefer? Best, Andrej I use TextPad. Teddy And how to compile and execu

Re: Open source IDE for Perl

2005-11-30 Thread Dermot Paikkos
On 30 Nov 2005 at 14:33, Andrej Kastrin wrote: > which is yours "best" open source IDE for Perl. I use SciTE under Linux, > but I'm a little confused on Windows. Which do you prefer? > vi -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Open source IDE for Perl

2005-11-30 Thread Octavian Rasnita
From: "Andrej Kastrin" <[EMAIL PROTECTED]> > Dear all, > > which is yours "best" open source IDE for Perl. I use SciTE under Linux, > but I'm a little confused on Windows. Which do you prefer? > > > Best, Andrej I use TextPad. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: Open source IDE for Perl

2005-11-30 Thread Xavier Noria
On Nov 30, 2005, at 14:33, Andrej Kastrin wrote: Dear all, which is yours "best" open source IDE for Perl. I use SciTE under Linux, but I'm a little confused on Windows. Which do you prefer? Eclipse + EPIC is excellent and multiplatform. -- fxn -- To unsubscribe, e-mail: [EMAIL PROTECTE

RE: open and edit file to prevent race conditions

2005-08-29 Thread Bob Showalter
Brent Clark wrote: > Hi List > > I have a scenario / debate if you wish with my colleague. > > The problem is I have to update a CSV file and the way I do it open > the file while reading / editting it I then send it to a temp file, > unlink the original and the rename the temp to the original fi

Re: open and edit file to prevent race conditions

2005-08-29 Thread Brent Clark
John W. Krahn wrote: Which operating system is this file on? Do you have ACLs or some such security to guaranty file locking? John Hi John Thanks for replying to my email. The file is a CSV file and so it will sit on Linux and sometimes a Win32 machine. In terms of the file locking, I j

Re: open and edit file to prevent race conditions

2005-08-29 Thread John W. Krahn
Brent Clark wrote: > Hi List Hello, > I have a scenario / debate if you wish with my colleague. > > The problem is I have to update a CSV file and the way I do it open the > file while reading / editting it I then send it to a temp file, unlink > the original and the rename the temp > to the ori

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

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

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

Re: open and ń

2004-11-25 Thread Jenda Krynicky
From: ruben <[EMAIL PROTECTED]> > I'm making an gui for a program and therefor I use the > > open(OPEN, 'command'); > while (){ > ... > } > > In my arguments I need to use an ń. When I execute this command > through perl it changes this character in a 3 other ones, and of > course that generat

Re: open a file for input

2004-11-24 Thread John W. Krahn
FlashMX wrote: Right...but my problem is I don't want the substitutions to happen on ALL the lines matched. Notice from the below input and output examples I do a grep to search for "0 AAA ". I then do a substitution on "0 AAA " to "0 AAA BBB ". Then the first occurence of "XXX" after the "0 AAA "

re: open a file for input

2004-11-24 Thread Chris Devers
On Wed, 24 Nov 2004, FlashMX wrote: > Right...but my problem is I don't want the substitutions to happen on > ALL the lines matched. Fine then. $line = sub_one( $line ) COND; Where COND is any condition you specify, e.g. $line = sub_one( $line ) if ( $line =~ /pattern one/ );

re: open a file for input

2004-11-24 Thread FlashMX
Right...but my problem is I don't want the substitutions to happen on ALL the lines matched. Notice from the below input and output examples I do a grep to search for "0 AAA ". I then do a substitution on "0 AAA " to "0 AAA BBB ". Then the first occurence of "XXX" after the "0 AAA " substitutio

re: open a file for input

2004-11-24 Thread Chris Devers
On Wed, 24 Nov 2004, FlashMX wrote: > I'm trying to understand the logic. When you open a file each line is > read in one at a time. At that point you can do whatever you want to > that line. In my case a search and replace. > > Can I do two search and replaces on the same line or would I have t

re: open a file for input

2004-11-24 Thread FlashMX
Hi, I'm trying to understand the logic. When you open a file each line is read in one at a time. At that point you can do whatever you want to that line. In my case a search and replace. Can I do two search and replaces on the same line or would I have to open the file again for a second pass?

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

Re: Open a text file

2004-09-30 Thread Jenda Krynicky
From: Eduardo Vázquez Rodríguez <[EMAIL PROTECTED]> > Thanks Chris I try this and works > >$. = 0; > do > { > $_ = > } > until $. == 5; Looks a bit too involved. Why not just for (1..5); ? > WHILE I believe you meant

Re: Open a text file

2004-09-29 Thread Eduardo Vázquez Rodríguez
Thanks Chris I try this and works $. = 0; do { $_ = } until $. == 5; WHILE { Do_whatever_you_like_begining_after_line_5(); :-) } Chris Devers wrote: On Wed, 29 Sep 2004, Eduardo Vázquez Rodríguez wrote: I have a question, how do I op

Re: Open a text file

2004-09-29 Thread Chris Devers
On Wed, 29 Sep 2004, Eduardo Vázquez Rodríguez wrote: > I have a question, how do I open a file in a specific line number, for example > I want to open a text file exactly on line number 5, What have you tried so far? What problems did you have? Show us what you've tried and we can make suggest

Re: OPEN command in Perl

2004-09-15 Thread Sheni R. Meledath
Hi Chris, Sorry to post the same message in two lists. I was not sure about where to post this query. Thank you very much for the valuable information. Shall try & revert. At 04:11 PM 9/15/2004, you wrote: On Wed, 15 Sep 2004, Sheni R. Meledath wrote: > How can I open an external file using Perl

Re: OPEN command in Perl

2004-09-15 Thread Chris Devers
On Wed, 15 Sep 2004, Sheni R. Meledath wrote: > How can I open an external file using Perl? The file is residing on another > server. I have to call the file using http. Now the following is not working. > > $email_file = "http://www.mysite.com/data/emails";; > open (LIST,"<$email_file/address.tx

Re: open CONSOLE?

2004-06-24 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Perl.Org) writes: >Is there a way to explicitly open a handle to the "console", or wherever >STDOUT/STDERR are directed to by default? > >My process is running in an environment in which STDOUT and STDERR have >already been redirected. I want t

Re: open CONSOLE?

2004-06-23 Thread LRMK
s" <[EMAIL PROTECTED]> To: "perl.org" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, June 23, 2004 3:59 PM Subject: Re: open CONSOLE? > perl.org wrote: > > Hi, > > > > Is there a way to explicitly open a handle to the "conso

Re: open CONSOLE?

2004-06-23 Thread Randy W. Sims
perl.org wrote: Hi, Is there a way to explicitly open a handle to the "console", or wherever STDOUT/STDERR are directed to by default? My process is running in an environment in which STDOUT and STDERR have already been redirected. I want to intercept these streams when running command line to

Re: open CONSOLE?

2004-06-23 Thread Randy W. Sims
perl.org wrote: Hi, Is there a way to explicitly open a handle to the "console", or wherever STDOUT/STDERR are directed to by default? My process is running in an environment in which STDOUT and STDERR have already been redirected. I want to intercept these streams when running command line to

Re: open(IN,) flock?

2003-06-02 Thread Tassilo von Parseval
On Sun, Jun 01, 2003 at 09:35:56AM -0700 Bob's Demise wrote: > I've written a Perl/CGI that allows a user to search > for a string in a specified file. I've yet to make > this little program widely available - and currently > with one or two users - it's quite speedy. I > anticipate no more than

Re: open(IN,) flock?

2003-06-02 Thread Rob Dixon
Rob Dixon wrote: > Bob'S Demise wrote: > > Hello > > > > I've written a Perl/CGI that allows a user to search > > for a string in a specified file. I've yet to make > > this little program widely available - and currently > > with one or two users - it's quite speedy. I > > anticipate no more tha

Re: open(IN,) flock?

2003-06-02 Thread Rob Dixon
Bob'S Demise wrote: > Hello > > I've written a Perl/CGI that allows a user to search > for a string in a specified file. I've yet to make > this little program widely available - and currently > with one or two users - it's quite speedy. I > anticipate no more than 20 users attempting to access >

Re: Open/Writing To A File Question

2002-10-08 Thread Jenda Krynicky
From: "Anthony Beaman" <[EMAIL PROTECTED]> > Hi! I'm sure this is simple and I'm overlooking something but here > goes. I'm trying to write a script that will ping a machine but print > it's results to a file (in Wordpad; I'm using NT) and the file will > open and show the results. I'm able to pi

RE: open() command and exiting script

2002-09-17 Thread Kothari, Amitkumar, NPONS
] Sent: Tuesday, September 17, 2002 11:55 AM To: [EMAIL PROTECTED] Subject: Re: open() command and exiting script Jordan C. wrote: > Hello. I have a transliterator script, and I need some help with it. > Source is at the bottom of this message. What I need help with in > particular i

Re: open() command and exiting script

2002-09-17 Thread david
Jordan C. wrote: > Hello. I have a transliterator script, and I need some help with it. > Source is at the bottom of this message. What I need help with in > particular is the open() command. The two relevant lines of the script > are: open(STDOUT, ">trans-d.html"); - and - print STDOUT "$transme

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
Hi, 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. TMTOWTDI, Jeff -Original Message- From: Jose

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
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. #! /usr/bi

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,

Re: open() function

2002-07-22 Thread Jean-Luc BEAUDET
Daniel David a Ýcrit : > Hi , > > how do you open a file - starting at a particular line? > eg to start reading the file from line 500 ? > > thanks for your help. > > _ > MSN Photos is the easiest way to share and print your photos:

RE: open command

2002-07-11 Thread LoBue, Mark
> -Original Message- > From: William Black [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 11, 2002 5:32 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: re: open command > > > The info in the two vars are correct. What doesen't work is > when

re: open command

2002-07-11 Thread William Black
The info in the two vars are correct. What doesen't work is when the email is sent it doesn't include the subject line and I can't tell why. William >From: Felix Geerinckx <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: re: open command >Date: 11 Jul

re: open command

2002-07-11 Thread Felix Geerinckx
on Thu, 11 Jul 2002 12:03:06 GMT, William Black wrote: > I'm using the open command with the pipe. For some reason this > doesn't work. Can anyone tell me why? > > open(MAIL,"| mail -s $subject $contact[0]->{email}") || die "can't > create"; Works for me. Could you be more specific wrt "doesn

re: open command

2002-07-11 Thread William Black
Hi all, I'm using the open command with the pipe. For some reason this doesn't work. Can anyone tell me why? open(MAIL,"| mail -s $subject $contact[0]->{email}") || die "can't create"; William Black _ MSN Photos is the easie

Re: Open a file to a Hash

2002-05-20 Thread drieux
On Sunday, May 19, 2002, at 07:31 , Jolinar of Malkshur wrote: > I wasn't asking for anyone to do my homework. I was just looking > for -suggestions- on how to do it a specific part that I got hung up on. > You know, pointers in the right direction? > > Jolinar >> what you are looking for is e

  1   2   >