CPAN Not installing dependencies ( was: Re: want to write to file in different format )

2014-07-08 Thread Kent Fredric
On 8 July 2014 19:00, Uday Vernekar wrote: > when i try to install Path::Tiny it gives me following error > > # The following REQUIRED prerequisites were not satisfied: > # > # File::Spec version '3.33' is not in required range '3.40' > # > t/00-report-prereqs.t . ok > t/basename.t ..

Re: want to write to file in different format

2014-07-08 Thread Uday Vernekar
when i try to install Path::Tiny it gives me following error # The following REQUIRED prerequisites were not satisfied: # # File::Spec version '3.33' is not in required range '3.40' # t/00-report-prereqs.t . ok t/basename.t .. File::Spec version 3.4 required--this i

Re: want to write to file in different format

2014-07-07 Thread Kent Fredric
I'm not about to write my own version here, just offer some pointers I find makes life easier for myself, and they may help others too if you're not bound to "I don't want to use CPAN". These days, I find it easier and safer to just use > use Path::Tiny qw(path); > > my $infile = path('numbers.tx

Re: want to write to file in different format

2014-07-07 Thread Nathan Hilterbrand
On 07/07/2014 10:26 AM, Розанда ЧУП wrote: Without comments is more clear :) == #!/usr/bin/perl -w use strict; use 5.010; open FILE, '<', "numbers.txt" or die "can not open file . $!\n"; open FILE1, '>>', "sumfile.txt" or die "can not open file . $!\n"; selec

Re: want to write to file in different format

2014-07-07 Thread Розанда ЧУП
thanks ! :) 07.07.2014, 17:38, "Shawn H Corey" : > On Mon, 07 Jul 2014 17:26:05 +0300 > Розанда ЧУП wrote: >>  #!/usr/bin/perl -w > > This turns the warnings on for everything, including modules that have > to violate best practices in order to achieve their function. It is > better to `use warni

Re: want to write to file in different format

2014-07-07 Thread Shawn H Corey
On Mon, 07 Jul 2014 17:26:05 +0300 Розанда ЧУП wrote: > #!/usr/bin/perl -w This turns the warnings on for everything, including modules that have to violate best practices in order to achieve their function. It is better to `use warnings;` so hey can turn it off where needed and you don't get wa

Re: want to write to file in different format

2014-07-07 Thread Розанда ЧУП
Without comments is more clear :) == #!/usr/bin/perl -w use strict; use 5.010; open FILE, '<', "numbers.txt" or die "can not open file . $!\n"; open FILE1, '>>', "sumfile.txt" or die "can not open file . $!\n"; select FILE1; # set the defualt output stream chom

Re: want to write to file in different format

2014-07-07 Thread Розанда ЧУП
#!/usr/bin/perl -w use strict; use 5.010; open FILE, '<', "numbers.txt" or die "can not open file . $!\n"; # recommended to use open with three argument open FILE1, '>>', "sumfile.txt" or die "can not open file . $!\n"; select FILE1; # set the defualt output stream chomp (my @lines = ); my (@ln,

RE: want to write to file in different format

2014-07-07 Thread Sunita Pradhan
Program is working . Thank you all. Date: Mon, 7 Jul 2014 15:48:48 +0530 Subject: Re: want to write to file in different format From: mukeshbarn...@gmail.com To: johndelac...@gmail.com CC: beginners@perl.org Very nice John!!!I couldn't think it.Mukesh Kumar Member of Technical Staff Ca

Re: want to write to file in different format

2014-07-07 Thread Mukesh Baranwal
Very nice John!!! I couldn't think it. *Mukesh Kumar* *Member of Technical Staff* *Cadence Design Systems (I) Pvt. Ltd.* *Mob:- +91-8527749333* On 7 July 2014 15:26, John Delacour wrote: > > On 7 Jul 2014, at 09:18, Sunita Pradhan > wrote: > > > I have a file of contents: > > --- >

Re: want to write to file in different format

2014-07-07 Thread John Delacour
On 7 Jul 2014, at 09:18, Sunita Pradhan wrote: > I have a file of contents: > --- > 1 6 > 2 7 > 3 8 > 4 9 > 5 10 > -- > I want a file with content: > > 1 2 3 4 5 > 6 7 8 9 10 Try this: #!/usr/local/bin/perl use strict; my (@col1, @col2); while () { chomp; my @words = spli

Re: want to write to file in different format

2014-07-07 Thread Mukesh Baranwal
#! /usr/bin/perl use strict; use warnings; my $str1 = ""; my $str2 = ""; my $res; open(FILE, "numbers.txt") or die "Can't open the file 1 $!\n"; open(FILE1, ">test1.txt") or die "Can't open the file 2 $!\n"; open(FILE2, ">test2.txt") or die "Can't open the file 3 $!\n"; while () { chomp; if(

Re: want to write to file in different format

2014-07-07 Thread Shaji Kalidasan
Hi Sunita, Here's one way to do it [code] use strict; use warnings; open my $fin, '<', 'data.txt' or die "Cannot open file ($!)"; open my $fout1, '>', 'output1.txt' or die "Cannot open file ($!)"; open my $fout2, '>', 'output2.txt' or die "Cannot open file ($!)"; while (<$fin>) { #Approach 1 us

want to write to file in different format

2014-07-07 Thread Sunita Pradhan
I have a file of contents: --- 1 6 2 7 3 8 4 9 5 10 -- I want a file with content: 1 2 3 4 5 6 7 8 9 10 I have written a few lines of following code but it does not work as expected : --- #!/usr/bin/perl use v5.10; use strict; use

Re: Subroutine doesn't write to file

2010-04-12 Thread Philip Potter
On 12 April 2010 16:39, Uri Guttman wrote: >> "PP" == Philip Potter writes: > >  PP> On 12 April 2010 11:34, Shlomi Fish wrote: >  >> Hi Uri and Philip (and Abimael), >  >> On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote: >  >>>   PP> Where did I say PBP was always right? I just didn't want

Re: Subroutine doesn't write to file

2010-04-12 Thread Uri Guttman
> "PP" == Philip Potter writes: PP> On 12 April 2010 11:34, Shlomi Fish wrote: >> Hi Uri and Philip (and Abimael), >> On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote: >>>   PP> Where did I say PBP was always right? I just didn't want to let your >>>   PP> style argument be the onl

Re: Subroutine doesn't write to file

2010-04-12 Thread Shlomi Fish
On Monday 12 Apr 2010 13:59:31 Philip Potter wrote: > On 12 April 2010 11:34, Shlomi Fish wrote: > > Hi Uri and Philip (and Abimael), > > > > On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote: > >> PP> Where did I say PBP was always right? I just didn't want to let > >> your PP> style argument b

Re: Subroutine doesn't write to file

2010-04-12 Thread Philip Potter
On 12 April 2010 11:34, Shlomi Fish wrote: > Hi Uri and Philip (and Abimael), > On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote: >>   PP> Where did I say PBP was always right? I just didn't want to let your >>   PP> style argument be the only one in this thread, since there are >> clearly PP> peo

Re: Subroutine doesn't write to file

2010-04-12 Thread Shlomi Fish
Hi Uri and Philip (and Abimael), On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote: > > "PP" == Philip Potter writes: > PP> On 12 April 2010 07:55, Uri Guttman wrote: > >>> "PP" == Philip Potter writes: > >> PP> On 12 April 2010 04:31, Uri Guttman wrote: > >> >>> "AM" == A

Re: Subroutine doesn't write to file

2010-04-12 Thread Uri Guttman
> "PP" == Philip Potter writes: PP> On 12 April 2010 07:55, Uri Guttman wrote: >>> "PP" == Philip Potter writes: >> >>  PP> On 12 April 2010 04:31, Uri Guttman wrote: >>  >>> "AM" == Abimael Martinez writes: >>  >> >>  >>  AM>   print {$tmp} "$div_start"; >>  >>

Re: Subroutine doesn't write to file

2010-04-12 Thread Philip Potter
On 12 April 2010 07:55, Uri Guttman wrote: >> "PP" == Philip Potter writes: > >  PP> On 12 April 2010 04:31, Uri Guttman wrote: >  >>> "AM" == Abimael Martinez writes: >  >> >  >>  AM>   print {$tmp} "$div_start"; >  >> >  >> no need for the {} around a single scalar handle. > >  PP> Bu

Re: Subroutine doesn't write to file

2010-04-11 Thread Uri Guttman
> "PP" == Philip Potter writes: PP> On 12 April 2010 04:31, Uri Guttman wrote: >>> "AM" == Abimael Martinez writes: >> >>  AM>   print {$tmp} "$div_start"; >> >> no need for the {} around a single scalar handle. PP> But it *does* comply with Perl Best Practices #136.

Re: Subroutine doesn't write to file

2010-04-11 Thread Philip Potter
On 12 April 2010 04:31, Uri Guttman wrote: >> "AM" == Abimael Martinez writes: > >  AM>   print {$tmp} "$div_start"; > > no need for the {} around a single scalar handle. But it *does* comply with Perl Best Practices #136. * It makes the filehandle obviously different from the other argumen

Re: Subroutine doesn't write to file

2010-04-11 Thread John W. Krahn
Abimael Martinez wrote: Hi, Hello, I am having some problems making this little script work, it is supposed glob files from current dir, and add stuff at the top and bottom of such files. I am also unshure how the "autoflush" works. use strict; use IO::File; use IO::Handle qw( ); my @

Re: Subroutine doesn't write to file

2010-04-11 Thread Uri Guttman
> "AM" == Abimael Martinez writes: AM> Hi, AM> I am having some problems making this little script work, it is supposed AM> glob files from current dir, and add stuff at the top and bottom of such AM> files. I am also unshure how the "autoflush" works. AM> use strict; AM> u

Subroutine doesn't write to file

2010-04-11 Thread Abimael Martinez
Hi, I am having some problems making this little script work, it is supposed glob files from current dir, and add stuff at the top and bottom of such files. I am also unshure how the "autoflush" works. use strict; use IO::File; use IO::Handle qw( ); my @web_docs = <*.html>; my @excluded =

Re: script won't write to file ...

2007-07-20 Thread John W. Krahn
Gregory Machin wrote: Hi Hello, I have a script that i'm working on, I want it to write info to a log file, but I can't get it to write to the file.. I run the script as root, and I also chmod 0777 the file but still no out put ... what have it missed .. ___script___ #!/usr/bin/perl print

Re: script won't write to file ...

2007-07-20 Thread Chas Owens
On 7/20/07, Gregory Machin <[EMAIL PROTECTED]> wrote: Ok thanks, for the advise, 2 questions - what did i do wrong in my original code, cause it's based on a working example, and is IO::File included in the default perl package ? is this script has to go on an embedded device with as min dependen

Re: script won't write to file ...

2007-07-20 Thread Gregory Machin
Ok thanks, for the advise, 2 questions - what did i do wrong in my original code, cause it's based on a working example, and is IO::File included in the default perl package ? is this script has to go on an embedded device with as min dependencies as possible ? Many Thanks On 7/20/07, Chas Owe

Re: script won't write to file ...

2007-07-20 Thread Chas Owens
On 7/20/07, Gregory Machin <[EMAIL PROTECTED]> wrote: Hi I have a script that i'm working on, I want it to write info to a log file, but I can't get it to write to the file.. I run the script as root, and I also chmod 0777 the file but still no out put ... what have it missed .. snip Simplify,

script won't write to file ...

2007-07-19 Thread Gregory Machin
Hi I have a script that i'm working on, I want it to write info to a log file, but I can't get it to write to the file.. I run the script as root, and I also chmod 0777 the file but still no out put ... what have it missed .. ___script___ #!/usr/bin/perl print "hello"; use use strict; #p

Re: a question write to file!

2007-07-06 Thread herostar1981
Thanks a lot... It's my fault, a big mistake Sorry, my $sta[0] is empty Because of the variables passed by html link. but when print to screen, I pass the right parameters. so awful Thanks again. Sorry. Best Regards, xu On 7 5 , 6 43 , [EMAIL PROTECTED] (Tom Phoenix) w

Re: a question write to file!

2007-07-05 Thread Tom Phoenix
On 7/5/07, herostar1981 <[EMAIL PROTECTED]> wrote: > What trouble? Are you saying that $kml printed to a file is > different than $kml rendered in a web browser, or what? yes, they are different. I don't know how to describe it.. Try this just before you print the variable, to the screen or t

Re: a question write to file!

2007-07-05 Thread herostar1981
please... this forum refresh so slowly On 7 5 , 1 06 , [EMAIL PROTECTED] (Tom Phoenix) wrote: > On 7/5/07, herostar1981 <[EMAIL PROTECTED]> wrote: > > > for (my $i=0;$i<=$#data;$i++) > > { $kml.="0station". > > $sta[$i]."";} > > That _might_ be correct. But why does the loop count th

Re: a question write to file!

2007-07-05 Thread herostar1981
> At this point, if I use following script, I can work as I wish: > print "Content-type: text/html\n\n"; > print $kml; 1station38a href=http://globec.whoi.edu>U.S.GLOBEC http://mapservice-xu.whoi.edu/globec.gif";> http://mapservice-xu.whoi.edu/maps-bin/globec-xu/map4>GEORGES BANK MAPSERVER http

Re: a question write to file!

2007-07-05 Thread Tom Phoenix
On 7/5/07, herostar1981 <[EMAIL PROTECTED]> wrote: for (my $i=0;$i<=$#data;$i++) { $kml.="0station". $sta[$i]."";} That _might_ be correct. But why does the loop count through the last element of the @data array, when you're processing the @sta array? And did you ever initialize $kml?

Re: a question write to file!

2007-07-05 Thread herostar1981
, the trouble is coming... What happened? BR, xu > herostar1981 <[EMAIL PROTECTED]> asked: > > > I have a big question. > > why are the contents different between what I write to file > > and what print in screen? > > Obviously you are doing somethin

Re: SOS: a question write to file!

2007-07-05 Thread herostar1981
rote: > > > why are the contents different between what I write to file and what > > print in screen? > > Because of something in your source code. > > Cheers! > > --Tom Phoenix > Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: SOS: a question write to file!

2007-07-05 Thread herostar1981
TED]> wrote: > > > why are the contents different between what I write to file and what > > print in screen? > > Because of something in your source code. > > Cheers! > > --Tom Phoenix > Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: SOS: a question write to file!

2007-07-05 Thread Tom Phoenix
On 7/5/07, herostar1981 <[EMAIL PROTECTED]> wrote: why are the contents different between what I write to file and what print in screen? Because of something in your source code. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

RE: a question write to file!

2007-07-05 Thread Thomas Bätzler
herostar1981 <[EMAIL PROTECTED]> asked: > I have a big question. > why are the contents different between what I write to file > and what print in screen? Obviously you are doing something wrong ;-) If you want us to help you, please send a minimal code sample that de

SOS: a question write to file!

2007-07-05 Thread herostar1981
Hi anybody, I have a big question. why are the contents different between what I write to file and what print in screen? I write a cgi script. In my opinion, it should write some information into file which locates /htdocs/tmp. But I don't know what happened. It can print in ter

RE: Write to file handle

2005-12-26 Thread Timothy Johnson
; print OUTFILE $_; close OUTFILE; } if ($comread) { $comread = 0; }else { sleep 1; } } -Original Message- From: swayam panda [mailto:[EMAIL PROTECTED] Sent: Sunday, December 25, 2005 11:08 PM To: b

Write to file handle

2005-12-25 Thread swayam panda
Hi All , I am using Win32::SerialPort to read the datas from the serial port .It's working fine .but i want to save (what ever the serial port is reading) to a log file continuously .Can anybody help me how to do .I know that i have open a file like open (*FIL,+>>log.txt) or d

Re: Write to file and tty from same print call

2004-12-12 Thread Harry Putnam
Harry Putnam <[EMAIL PROTECTED]> writes: > Note that the original example from perldoc IO::Tee > has no opens in it: > > use IO::Tee; > >$tee = IO::Tee->new($handle1, $handle2); >print $tee "foo", "bar"; >my $input = <$tee>; > > Haa, I dug it up o

Re: Write to file and tty from same print call

2004-12-12 Thread Harry Putnam
Harry Putnam <[EMAIL PROTECTED]> writes: > cat io.pl > #!/usr/local/bin/perl -w > > use IO::Tee; > > open($handle1, "file1") or die("No!"); > open($handle2, "echo") or die("No2!"); > > $tee = IO::Tee->new($handle1, $handle2); > > print $tee "Hello world!"; Note that the or

Re: Write to file and tty from same print call

2004-12-12 Thread Harry Putnam
Tor Hildrum <[EMAIL PROTECTED]> writes: > #!/usr/bin/perl > use IO::Tee; > > open($handle1, "file1") or die("No!"); > open($handle2, "echo") or die("No2!"); > > $tee = IO::Tee->new($handle1, $handle2); > print $tee "Hello world!"; Well thats better than what I came up with but it dies here on the

Re: Write to file and tty from same print call

2004-12-12 Thread Tor Hildrum
On Sun, 12 Dec 2004 19:32:53 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Yeah, probably something like that but what else needs to be in there > to make the example work? Wild guess: #!/usr/bin/perl use IO::Tee; open($handle1, "file1") or die("No!"); open($handle2, "echo") or die("No2

Re: Write to file and tty from same print call

2004-12-12 Thread reader
Tor Hildrum <[EMAIL PROTECTED]> writes: > I have never used this module before in my life, but are you sure > $handle1 and $handle2 aren't supposed to be refs to actual > File-Handles? Yeah, probably something like that but what else needs to be in there to make the example work? Running it just

Re: Write to file and tty from same print call

2004-12-12 Thread Tor Hildrum
On Sun, 12 Dec 2004 15:33:44 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Trying to see something of how it works: > > #!/usr/local/bin/perl -w > use IO::Tee; > my ($handle1, $handle2); > $handle1 = "./one" > $handle2 = "./two" > $tee = IO::Tee->new($handle1, $handle2); I have never use

Re: Write to file and tty from same print call

2004-12-12 Thread reader
[EMAIL PROTECTED] writes: > Scott Dial <[EMAIL PROTECTED]> writes: > >> Try: >> http://search.cpan.org/~kenshan/IO-Tee-0.64/Tee.pm > >>> === >>> Something I've wanted a few times was a way to write to two places at >>> once or really I mean with one print call. >>> >>> Something like: >>> print

Re: Write to file and tty from same print call

2004-12-12 Thread reader
Scott Dial <[EMAIL PROTECTED]> writes: > Try: > http://search.cpan.org/~kenshan/IO-Tee-0.64/Tee.pm >> === >> Something I've wanted a few times was a way to write to two places at >> once or really I mean with one print call. >> >> Something like: >> print FILE1 FILE2 "something\n"; >> or >>

Re: Write to file and tty from same print call

2004-12-12 Thread Scott Dial
Try: http://search.cpan.org/~kenshan/IO-Tee-0.64/Tee.pm -smd +++ Harry Putnam [12/12/04 14:02 -0600]: > Duplication alert: I hope this isn't a duplicate but I think something > strange happened to my first try > > === > Something I've wanted a few times was a way to write to two places at > once

Write to file and tty from same print call

2004-12-12 Thread Harry Putnam
Duplication alert: I hope this isn't a duplicate but I think something strange happened to my first try === Something I've wanted a few times was a way to write to two places at once or really I mean with one print call. Something like: print FILE1 FILE2 "something\n"; or print FILE TTY "some

Re: Write to file with shared server certificate

2004-07-09 Thread Gunnar Hjalmarsson
Ron Goral wrote: Thanks again for the replies. I contacted my host and the shared SSL does indeed operate under its own name which is different from mine. It is possible to create files under such circumstances, but they must be created in a folder that is 0777. I'm not crazy about having a fold

RE: Write to file with shared server certificate

2004-07-09 Thread Ron Goral
> -Original Message- > From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 08, 2004 8:58 PM > To: [EMAIL PROTECTED] > Subject: Re: Write to file with shared server certificate > > > Ron Goral wrote: > > If I try to create the file usi

Re: Write to file with shared server certificate

2004-07-08 Thread Gunnar Hjalmarsson
Ron Goral wrote: If I try to create the file using open(LOG,"+>>$logfile), the error is: No such file or directory at /usr/wwws/htdocs/mydomain/cgi-bin/test.cgi line 35. You must not include the '+' character when creating a file. perldoc perlopentut Try: open LOG, ">> $logfile" or die $!;

RE: Write to file with shared server certificate

2004-07-08 Thread Ron Goral
> -Original Message- > From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 08, 2004 3:25 PM > To: [EMAIL PROTECTED] > Subject: Re: Write to file with shared server certificate > > > Ron Goral wrote: > > chmod 0666 is the right thing.

Re: Write to file with shared server certificate

2004-07-08 Thread Gunnar Hjalmarsson
Ron Goral wrote: chmod 0666 is the right thing. Thank you. However, I am not able to do that programmatically when the script is running in secure mode. The following dies: $file_path = qq[/usr/wwws/htdocs/mydomain/cgi-bin/logs/errs.log]; chmod 0666,$file_path or die "Cannot chmod $file_path - $!

RE: Write to file with shared server certificate

2004-07-08 Thread Ron Goral
> -Original Message- > From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 08, 2004 9:19 AM > To: [EMAIL PROTECTED] > Subject: Re: Write to file with shared server certificate > > > Ron Goral wrote: > > I need to write to a log file to re

Re: Write to file with shared server certificate

2004-07-08 Thread Gunnar Hjalmarsson
Ron Goral wrote: I need to write to a log file to record things happening in a cgi script. The environment is secured using a server-wide, shared certificate. I cannot write to the file and get an error telling me I do not have the proper permissions to do so. So, why don't you change the file per

Write to file with shared server certificate

2004-07-08 Thread Ron Goral
Greetings - I need to write to a log file to record things happening in a cgi script. The environment is secured using a server-wide, shared certificate. I cannot write to the file and get an error telling me I do not have the proper permissions to do so. The log file is in my web's directory, b

RE: one line creat and write to file?

2003-02-11 Thread Dan Muey
Sweet thanks! > On Mon, 10 Feb 2003 12:32:16 -0600, Dan Muey wrote: > > > I'm tryin got find the quickest way to creat a file and write to it. > > > > I know I can do > > open > > print FILEHANDLE $stuff; > > close... > > and perhaps ad some flocks for good measure > > > > what I'm won

Re: one line creat and write to file?

2003-02-10 Thread Janek Schleicher
On Mon, 10 Feb 2003 12:32:16 -0600, Dan Muey wrote: > I'm tryin got find the quickest way to creat a file and write to it. > > I know I can do > open > print FILEHANDLE $stuff; > close... > and perhaps ad some flocks for good measure > > what I'm wondering is if there is a one line way to

RE: one line creat and write to file?

2003-02-10 Thread Dan Muey
> > > Dan Muey wrote: > > > I'm tryin got find the quickest way to creat a file and write to it. > > > > I know I can do > > open > > print FILEHANDLE $stuff; > > close... > > and perhaps ad some flocks for good measure > > > > what I'm wondering is if there is a one line way to do it

Re: one line creat and write to file?

2003-02-10 Thread david
Dan Muey wrote: > I'm tryin got find the quickest way to creat a file and write to it. > > I know I can do > open > print FILEHANDLE $stuff; > close... > and perhaps ad some flocks for good measure > > what I'm wondering is if there is a one line way to do it > something like > > createf

one line creat and write to file?

2003-02-10 Thread Dan Muey
I'm tryin got find the quickest way to creat a file and write to it. I know I can do open print FILEHANDLE $stuff; close... and perhaps ad some flocks for good measure what I'm wondering is if there is a one line way to do it something like createfile("filename.txt",$content); somethin

RE: write to file

2003-01-17 Thread Dylan Boudreau
open FILEHANDLE, "> output.txt" or die "$!"; print FILEHANDLE "Some text\n"; print FILEHANDLE "Some more text\n"; close FILEHANDLE; Dylan -Original Message- From: Thomas Browner [mailto:[EMAIL PROTECTED]] Sent: January 17, 2003 10:22 AM T

write to file

2003-01-17 Thread Thomas Browner
How do I use perl to write to a file? Thomas

Re: write to file

2003-01-16 Thread simran
open(OUT, "> test.txt") || die; print OUT "This is a test...\n"; print OUT "More text...\n"; close(OUT); On Fri, 2003-01-17 at 08:26, [EMAIL PROTECTED] wrote: > How can I write to a file in perl. > > Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

RE: write to file

2003-01-16 Thread Dan Muey
> How can I write to a file in perl. perldoc -f open open(FILEHANDLE, ">$path_to_file") or die $@; print FILEHANDLE $newfilecontents; close(FILEHANDLE); > writes over >> appends < reads open... @lines_in)file = ; close... Dan > > Thomas > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED

write to file

2003-01-16 Thread thomas . browner
How can I write to a file in perl. Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: select from oracle and write to file

2002-05-01 Thread Shah, Urmil
from oracle and write to file Thanks for the help!! I think it's almost there. This is what my script look like now: use strict; use DBI; open(TEXTFILE,">output.txt"); my $dbh = DBI->connect( 'dbi:Oracle:db', 'us

RE: select from oracle and write to file

2002-05-01 Thread DeBaets, Kirk
day, April 30, 2002 6:20 PM To: [EMAIL PROTECTED] Subject: select from oracle and write to file Hello all, Solaris, Oracle 8.1.6, Perl 5 How do I write my selected row from Oracle out to a new file? Below is what I have so far. I can select the row, but I don't know how to write it to a

Re: select from oracle and write to file

2002-04-30 Thread David vd Geer Inhuur tbv IPlib
Hi Garrett, Not shure if this is where you are looking for, but here is some simple info on how to write data to a file. If it is not sufficient you'll have to wait for the real ones to wake up :) $file = "/path/to/file"; open(F, "> $file"); print F "What you want to store in your file, can al

RE: select from oracle and write to file

2002-04-30 Thread garrett esperum
kage name at ./one.pl line 26. Any input as to why this happens?? -garrett >From: "Shah, Urmil" <[EMAIL PROTECTED]> >To: garrett esperum <[EMAIL PROTECTED]> >Subject: RE: select from oracle and write to file >Date: Tue, 30 Apr 2002 17:34:24 -0500 > > >open(T

select from oracle and write to file

2002-04-30 Thread garrett esperum
Hello all, Solaris, Oracle 8.1.6, Perl 5 How do I write my selected row from Oracle out to a new file? Below is what I have so far. I can select the row, but I don't know how to write it to a new file: #!/usr/local/bin/perl -w # # REMEMBER! Set the environment variable: ORACLE_HOME=/path-to-