On Mon, Aug 1, 2011 at 1:54 AM, newbie01 perl wrote:
>
> Hi all,
>
> I have several *nix version of Unix and while some I can use df -h, for
> some I can't. The only common thing that I can use that works for all is df
> -k.
>
>
> Below is the output when r
2011/8/1 newbie01 perl
>
> Hi all,
>
>
Hi!
> I have several *nix version of Unix and while some I can use df -h, for
> some I can't. The only common thing that I can use that works for all is df
> -k.
>
>
> Below is the output when running df -k:
> =
> "np" == newbie01 perl writes:
np> Uru:
the name is uri.
np> - Sorry, can't use DBI/DBD. I wish I can but unfortunately, am not
np> allowed to install any additional modules. I've passed on that
np> request to the SA already and hopefully, he will install it. I
np> need to learn
Hi YuanYou,
Thanks .. that one works alright ...
Uru:
- Sorry, can't use DBI/DBD. I wish I can but unfortunately, am not allowed
to install any additional modules. I've passed on that request to the SA
already and hopefully, he will install it. I need to learn how to use it
too, eventually I gues
> "yy" == yuanyou yao writes:
yy> Can you please try
yy> open(ORA, "| dgmgrl | tee dgmgrl.out" ) ?
this begs the whole question of why the OP isn't using DBI.
yy> 2010/5/27 newbie01 perl :
>> Hi all,
>>
>> Can someone please help and advise if it is possible to have the output
Can you please try
open(ORA, "| dgmgrl | tee dgmgrl.out" ) ?
2010/5/27 newbie01 perl :
> Hi all,
>
> Can someone please help and advise if it is possible to have the output of
> the code below to the screen and at the same time to the file as well?
>
> open(ORA, "| dgmgrl > dgmgrl.out" ) or die "C
Chas. Owens wrote:
On Mon, Apr 13, 2009 at 15:39, Rick wrote:
perl -lane' print "$F[0] ", "$F[4]" , " $F[5]";'
Is there anyway to incoporate $\ <- output record separtor to do this
instead of printing out w/ manual spaces beteween the variables?
snip
No, you want to use $, or $". Si
Rick wrote:
perl -lane' print "$F[0] ", "$F[4]" , " $F[5]";'
Is there anyway to incoporate $\ <- output record separtor to do this
instead of printing out w/ manual spaces beteween the variables?
The Output Record Separator is what comes at the end of the record (or
line in this case), in
On Mon, Apr 13, 2009 at 15:39, Rick wrote:
>
>
> perl -lane' print "$F[0] ", "$F[4]" , " $F[5]";'
>
> Is there anyway to incoporate $\ <- output record separtor to do this
> instead of printing out w/ manual spaces beteween the variables?
snip
No, you want to use $, or $". Since $" is already se
Dermot wrote:
2009/2/4 Rob Canning :
hello,
i am new to this list and very new to pearl.
i have run into a problem i cant find a solution - i have searched the net
for an answer but as i am so new to perl (and programming in general)
perhaps i dont even know the right keywords...
ok here it
2009/2/4 Rob Canning :
> hello,
> i am new to this list and very new to pearl.
> i have run into a problem i cant find a solution - i have searched the net
> for an answer but as i am so new to perl (and programming in general)
> perhaps i dont even know the right keywords...
>
> ok here it goes..
John W. Krahn wrote:
Brian wrote:
Hello
Hello,
Having played around for a while, I am able to get a reasonable result
using Example 1, the unreasonable part being that l> gets added to the
end of the file, I can only presume here that it is duplicating the
last 2 characters of the last lin
Brian wrote:
Hello
Hello,
Having played around for a while, I am able to get a reasonable result
using Example 1, the unreasonable part being that l> gets added to the
end of the file, I can only presume here that it is duplicating the last
2 characters of the last line in the file, that be
Vb wrote:
What I'm trying to do is to create a program that reads through a
certain directory and outputs the location of each file(both in the
directory and subdirectorys) into a text file. I am completely new to
Perl and under a time restriction so any help would be greatly
appreciated...thanks
On Tuesday 16 September 2008 12:50:32 pm Vb wrote:
> What I'm trying to do is to create a program that reads through a
> certain directory and outputs the location of each file(both in the
> directory and subdirectorys) into a text file. I am completely new to
> Perl and under a time restriction so
Hello,
Does thie mean when I say,
binmode(STDOUT, ":utf8");
The characters would be translated to utf8 for output automatically?
(Would I need to translate them to utf8 firstly before output?)
Thanks again.
2007/5/16, Jeff Pang <[EMAIL PROTECTED]>:
Jen mlists 写道:
> Hello,
>
> I need to outp
Jen mlists 写道:
Hello,
I need to output contents with utf8 encoding in CGI scripts.
Can you tell me how to open STDOUT with utf8 support?Thanks you.
Hello,
Just do,
binmode(STDOUT, ":utf8");
see "perldoc perluniintro" for more details.
--
Jeff Pang
http://home.arcor.de/jeffpang/
--
To unsub
Check out
http://perldoc.perl.org/encoding.html
On 5/15/07, Jen mlists <[EMAIL PROTECTED]> wrote:
Hello,
I need to output contents with utf8 encoding in CGI scripts.
Can you tell me how to open STDOUT with utf8 support?Thanks you.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional co
Gr check syntax check syntax ; lol ...
On 3/1/07, Bill Jones <[EMAIL PROTECTED]> wrote:
# A long winded approach might use
# (modified from FAQ 8) -
use IPC::Open3;
$_ = "I am the Alpha and the Omega (UT99 Player Xan)\n";
open(o, "cat $_");
print;
print "H?\n";
That code wil
On 3/1/07, David Moreno Garza <[EMAIL PROTECTED]> wrote:
What's the proper way to handle buffering? I mean, to prevent it.
Sometimes you just want to output immediately; however as Tom mentioned
'cat' doesn't output until the buffer is closed; for example -
$|++; # Setting this has no effect o
Tom Phoenix wrote:
> On 2/28/07, Bill Jones <[EMAIL PROTECTED]> wrote:
>
> ># Out of curiousity -- why does line 2 get printed first?
>
> >open(o,"|cat");print o "I think I am 1st? ^L^M";
> >$_ = "LINE 2: Jvtu bopuifs Pfsm ibdlfs ..."; y/a-z/za-y/; print
>
> Buffering: cat can't give all of its
On 2/28/07, Bill Jones <[EMAIL PROTECTED]> wrote:
# Out of curiousity -- why does line 2 get printed first?
open(o,"|cat");print o "I think I am 1st? ^L^M";
$_ = "LINE 2: Jvtu bopuifs Pfsm ibdlfs ..."; y/a-z/za-y/; print
Buffering: cat can't give all of its output until you finish writing
t
What is the code for this from the
> window
> > > promt(not within the script itself)?
> > >
> > > c:\>perl test.pl >1(this will save the result in
> the
> > > current directory.
> > > How about saving the result to c:/perl/self/?)
> > >
> > > Thanks,
> > >
> > > Li
> >
> > Hi Li,
> >
> > Google
On 9/10/06, Jen Spinney <[EMAIL PROTECTED]> wrote:
On 9/10/06, chen li <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> When I run scripts I want the result saved to a
> different directory instead of the current one on
> window xp. What is the code for this from the window
> promt(not within the script
On 9/10/06, chen li <[EMAIL PROTECTED]> wrote:
Hi all,
When I run scripts I want the result saved to a
different directory instead of the current one on
window xp. What is the code for this from the window
promt(not within the script itself)?
c:\>perl test.pl >1(this will save the result in th
chen li wrote:
Hi all,
When I run scripts I want the result saved to a
different directory instead of the current one on
window xp. What is the code for this from the window
promt(not within the script itself)?
c:\>perl test.pl >1(this will save the result in the
current directory.
How about
On 5/25/05, Manav Mathur wrote:
>
> our $rupee = ;
> chomp($rupee) ;
Vineet,
This is a quote from "perldoc perlop":
"In scalar context, evaluating a filehandle in angle brackets yields
the next line from that file (the newline, if any, included),"
Manav's solution involves removing the newline us
you forgot to chomp both your currency holders. Both contain a newline at
the end, but the second one _appears_ ok to your eyes coz its the end of the
line. You should chomp both (as shown below), and then format your output
with any newlines if necessary...
|-Original Message-
|From: Vin
Thanks everyone for the input.
Getting the date output is much easier in perl than I originally thought.
thanks!
Geraldine
> On Tue, 8 Mar 2005, Ankur Gupta wrote:
>
> > [EMAIL PROTECTED] wrote:
> >
> > > Hi,
> > > Is there a way to store the output of a system call on unix?
> > >
> > > e
On Tue, 8 Mar 2005, Ankur Gupta wrote:
> [EMAIL PROTECTED] wrote:
>
> > Hi,
> > Is there a way to store the output of a system call on unix?
> >
> > eg. system("date");
> >
> use backticks...
>
> $date = `date`;
This is, of course, exactly the wrong way to solve this problem.
Perl has date f
[EMAIL PROTECTED] wrote:
Hi,
Is there a way to store the output of a system call on unix?
eg. system("date");
I like to store the date output to a variable. The only way I know of is to
open and write the output to a file and then read in to a variable. Is there a
simpler way?
Thanks in advance.
chomp($date=`date`) ; ##exploiting what Perl offers but C doesnt
-Original Message-
From: Ankur Gupta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 08, 2005 10:03 PM
To: [EMAIL PROTECTED]
Cc: beginners@perl.org
Subject: Re: output from system call
[EMAIL PROTECTED] wrote:
>Hi,
- Original Message -
From: [EMAIL PROTECTED]
Date: Tuesday, March 8, 2005 11:29 am
Subject: output from system call
> Hi,
Hello,
> Is there a way to store the output of a system call on unix?
>
sure
> eg. system("date");
my $Date = system("date");
>
> I like to store the date output
[EMAIL PROTECTED] wrote:
Hi,
Is there a way to store the output of a system call on unix?
eg. system("date");
use backticks...
$date = `date`;
Don't forget to chomp the $date variable as I guess you just want the date, not
the newline character with it...
chomp($date);
--
To unsubscribe, e-mail:
Tim Johnson wrote:
That doesn't work on my WinXP, but this does...
perl -e "$|=1; print \"\rLine $_\" and sleep 1 for 1..3; print \"\n\""
Its because you used double quotes instead of single quotes to surround
the expression and need to escape the internal ones :)
Try this (paste it exactly as i
Chris Devers wrote:
On Wed, 15 Sep 2004, JupiterHost.Net wrote:
Does the \r solution work on winders (I don't have any Winders computers)
also?
perl -e '$|=1; print "\rLine $_" and sleep 1 for 1..3; print "\n"'
I've just successfully tested it on the Cygwin version of Perl, both
cool, thanks!
f
That doesn't work on my WinXP, but this does...
perl -e "$|=1; print \"\rLine $_\" and sleep 1 for 1..3; print \"\n\""
-Original Message-
From: JupiterHost.Net [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 15, 2004 2:03 PM
To: [EMAIL PR
On Wed, 15 Sep 2004, JupiterHost.Net wrote:
> Does the \r solution work on winders (I don't have any Winders computers)
> also?
>
> perl -e '$|=1; print "\rLine $_" and sleep 1 for 1..3; print "\n"'
I've just successfully tested it on the Cygwin version of Perl, both
from a local DOS window and
I've seen a Damian Conway presentation where he faked out this
behavior by prefixing all output with enough backspace ("\h")
characters to wipe out the previous output and display a new line.
I guess you mean \b, not \h :-)
That must've been it then :)
That does work for me under Win2k.
Does the
From: Chris Devers <[EMAIL PROTECTED]>
> On Tue, 14 Sep 2004, JupiterHost.Net wrote:
>
> > I'd like the line to change as it runs, sort of an animated
> > delivery:
>
> I've seen a Damian Conway presentation where he faked out this
> behavior by prefixing all output with enough backspace ("\h")
>
Does that make sense :) ??
Yes. Just print a \r to move the cursor back to the beginning of the line.
perl -e '$|=1; print "\rLine $_" and sleep 1 for 1..3; print "\n"'
Nice, that does it perfectly, thanks Bob for the \r
Thanks also to Chris for the same idea but different character :)
Have a gdoo
JupiterHost.Net wrote:
> Hello list,
>
> I've seen this done, but am not sure what its called or where to start
> looking...
>
> Instead of the output of a script via CLI being:
>
> # perl script.pl
> line1
> line2
> line3
> etc
> #
>
> I'd like the line to change as it runs, sort of an animate
Chris Devers wrote:
On Tue, 14 Sep 2004, JupiterHost.Net wrote:
I'd like the line to change as it runs, sort of an animated delivery:
I've seen a Damian Conway presentation where he faked out this behavior
by prefixing all output with enough backspace ("\h") characters to wipe
out the previous
On Tue, 14 Sep 2004, JupiterHost.Net wrote:
> I'd like the line to change as it runs, sort of an animated delivery:
I've seen a Damian Conway presentation where he faked out this behavior
by prefixing all output with enough backspace ("\h") characters to wipe
out the previous output and display
[EMAIL PROTECTED] wrote:
Gunnar Hjalmarsson wrote:
[EMAIL PROTECTED] wrote:
I will have a file that contains anywhere from 1-40 strings,
but I would like 4 E strings per line then a \n
This seems to be the same problem as you posted about a few days
ago:
http://www.mail-archive.com/beginners%40per
:16 PM
To: [EMAIL PROTECTED]
cc:
Subject: Re: output
[EMAIL PROTECTED] wrote:
> my goal will look like this:
>
> -w 'barcode="E00085" or barcode="E00086" or barcode="E00096" or
> barcode="E00184"
&g
[EMAIL PROTECTED] wrote:
my goal will look like this:
-w 'barcode="E00085" or barcode="E00086" or barcode="E00096" or
barcode="E00184"
-w 'barcode="E00293" or barcode="E00351" or barcode="E00524" or
barcode="E00584"
-w 'barcode="E00587" or barcode="E00588" or barcode="E00589" or
barcode="E00654"
Harry Putnam wrote:
I'm getting this output on stderr from a next clause:
Exiting subroutine via next at ./test_bol.pl line 101.
I wondered why this happens. Is it considered an error or what?
The script is lengthy so not posting it here but the next does exit a
sub routine. That is why I put
"Randy W. Sims" <[EMAIL PROTECTED]> writes:
> Use 'return' to exit from a subroutine. Use 'next', 'redo', 'last',
> and 'goto' to alter the execution path in loop constructs; they must
> appear /inside/ the block owned by the loop construct or within a
> sub-block.
Ahh, ok thanks. Return turns o
On Sat, Mar 27, 2004 at 03:24:13PM -0500, Randy W. Sims wrote:
> Harry Putnam wrote:
> >I'm getting this output on stderr from a next clause:
> > Exiting subroutine via next at ./test_bol.pl line 101.
> >
> >I wondered why this happens. Is it considered an error or what?
> >
> >The script is len
Harry Putnam wrote:
I'm getting this output on stderr from a next clause:
Exiting subroutine via next at ./test_bol.pl line 101.
I wondered why this happens. Is it considered an error or what?
The script is lengthy so not posting it here but the next does exit a
sub routine. That is why I put
Kevin Roland Viel wrote:
> Greetings,
>
>I have just installed ActivePerl 5.8.0.806 on a Win2000 machine. My
> path variable contains C:\Perl\bin\. I have the following code in a
> program
> print.pl:
>
> $DNA="AGT";
> print $DNA;
> exit;
>
>Where might I see the results? For instance,
It won't keep a window open in run. It will run the program print the
results and close the window. Usually faster then you can see.
Start run cmd.
The go to the directory and run the script.
What kind of "log" file are you looking for? Its not going to just log
itself. You can have your scripts cr
From: "David H. Lynch Jr." <[EMAIL PROTECTED]>
> Below is a perlscript to do approximately what you asked. I found it
> somewhere else on the web. Unfortunately I do not remember where, and
> I have seen several similar. It is pretty basic anyway.
>
> #!/usr/bin/Perl
>
> use MIM
Well, here's how I do it...using sendmail on a *nix machine.
my $MAILFROM = '[EMAIL PROTECTED]';
my $MAILSUBJECT = "subject goes here";
my $MAILTO = '[EMAIL PROTECTED],[EMAIL PROTECTED]'; # or "user1\@domain.com"
open(SENDMAIL, "| /usr/lib/sendmail $MAILTO") || die;
print(SENDMAIL "From: $MAILFR
Below is a perlscript to do approximately what you asked. I found it
somewhere else on the web. Unfortunately I do not remember where, and I
have seen several similar. It is pretty basic anyway.
I have a database application that outputs pay stubs to a text file. I
then use another script to conv
From: "Derek Brinson" <[EMAIL PROTECTED]>
> I have a PERL installed on a WinIIS box. This script queries a (SQL)
> database, makes a few minor manipulations to that data, then builds a
> small paragraph of text, from there.
>
> So, how do I send that text info to an e-mail address (gathered from
>
Does Word2000 understand Unicode? Does it default to trying to read
Unicode, rather than ASCII or the like? I have used jEdit with success
to read/write Unicode files.
--Chris
On Monday, December 9, 2002, at 02:30 PM, Raghupathy, Ramesh . wrote:
Hi,
I am using perl 5.8.0 for windows to
Jose Malacara said:
> Can someone please tell me what I'm doing wrong here?
>
> I have a data file that looks like this:
>
> jason,texas,austin
> tim,denver,colorado
> jose,oregon,portland
>
>
> And a script to update the last field and output the results with the
> new city.
Without having teste
On 21 Nov 2002, Jose Malacara wrote:
> Can someone please tell me what I'm doing wrong here?
>
> I have a data file that looks like this:
>
> jason,texas,austin
> tim,denver,colorado
> jose,oregon,portland
>
>
> And a script to update the last field and output the results with the
> new city:
When you print() an array, do not put it in quotes unless you want Perl to
put the default record separator between each element of the array. Take
out the double-quotes and it will come out the way you want.
-Original Message-
From: Jose Malacara
To: [EMAIL PROTECTED]
Sent: 11/20/02 11
Peter Lemus wrote:
> Hi, folks,
>
> I have a scripts that prints to a log file. I would
> like to receive all messages on my terminal also when
> the script runs. Please enlight me...thanks.
there is a Tie::FileHandle::MultiPlex module which let's you chain multiple
file hanldes like:
tie
Peter Lemus wrote:
> Hi, folks,
>
> I have a scripts that prints to a log file. I would
> like to receive all messages on my terminal also when
> the script runs. Please enlight me...thanks.
>
> The scripts looks something like this...
> #MAIN
> #-
From: Peter Lemus <[EMAIL PROTECTED]>
> I have a scripts that prints to a log file. I would
> like to receive all messages on my terminal also when
> the script runs. Please enlight me...thanks.
You may want to look at IO::Tee (on CPAN) or Local::TeeOutput (
http://Jenda.Krynicky.cz/#Local::T
The easiest way I've found:
Tee("This is the text I want.\n");
sub Tee{
print OUTFILE @_;
print @_;
}
-Original Message-
From: Peter Lemus [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 5:41 PM
To: [EMAIL PROTECTED]
Subject: output to console and to logfile.
Hi, fo
> I'm using the following command to output the results to screen and a
> output file:
>
> open(F,"tee $2 @ARGV[0].txt >CON:");
>
> This works great but the output file created .txt
> has a "box"
> ascii character. Looks like a carraige return also.
> How can I remove this?
This sounds like
On Wednesday, June 12, 2002, at 07:07 , phumes1 wrote:
>
> I'm using the following command to output the results to screen and a
> output file:
>
> open(F,"tee $2 @ARGV[0].txt >CON:");
>
> This works great but the output file created .txt has a "box"
> ascii character. Looks like a carraige re
How about:
select DATA;
Then all print statements will write to that filehandle.
Craig A. Sharp
Unix Systems Administrator
DNS Administrator
Roush Industries
Office: 734-466-6286
Cell: 734-231-6769
Fax: 734-466-6939
[EMAIL PROTECTED]
I have
print DATA "information";
-Original Message-
From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 1:47 PM
To: [EMAIL PROTECTED]
Subject: output to a textfile
i have opened a filehandle to a textfile with:
open(DATA, ">/home/edhunter/0001.txt") or die "Could n
On Mar 19, Matthew Harrison said:
>open(DATA, ">/home/edhunter/0001.txt") or die "Could not attach filehandle
>/home/edhunter/0001.txt\n";
>
>but what is the syntax to write into it? i have tried everthing i can find.
print DATA "something\n";
And you might not want to use the name "DATA" f
print DATA "your input";
>From: Matthew Harrison <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: output to a textfile
>Date: Tue, 19 Mar 2002 18:46:50 +
>
>i have opened a filehandle to a textfile with:
>
>open(DATA, ">/home/edhunter/0001.txt") or die "Could not attach filehandle
>/home
print DATA "put your stuff here";
perldoc -f print
print FILEHANDLE LIST;
> -Original Message-
> From: Matthew Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 19, 2002 1:47 PM
> To: [EMAIL PROTECTED]
> Subject: output to a textfile
>
>
> i have opened a filehandle to a text
Yes. Very easy compared to OLE. Using it for a couple of jobs which I send
emails on a daily basis.
Wags ;)
-Original Message-
From: Matt C. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 17:56
To: [EMAIL PROTECTED]
Subject: Re: output information to a xls file
Csv may well be easier for you, but I thought I'd shoot you this link. I've not used
it, but it does what you want to do for sure.
http://search.cpan.org/doc/JMCNAMARA/Spreadsheet-WriteExcel-0.34/WriteExcel.pm
Matt
--- Lance Prais <[EMAIL PROTECTED]> wrote:
> I have a perl script that generate
Is formatting absolutely essential? The easiest way is to create a text
file with each column separated by commas. If you make the file a .csv
file, Excel will automatically open it, but you will have to apply your own
formatting.
-Original Message-
From: Lance Prais [mailto:[EMAIL PRO
"Hubert Ian M. Tabug" wrote:
>
> Hello,
Hello,
> Has anyone ever tried toying or configuring fping
> and parsing its output via perl? The reason why I am asking
> this question is that, I am trying to capture the output
> generated by the command fping -s, what fping -s does is
> that i
);
...
[Sathish]
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 28, 2001 11:39 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Output to email
The value for the hash-key 'Subject' should be a scalar such as a n
PROTECTED]',
Subject => substr($line, 43, 7)
Message => 'Test message'
);
Sathish
-Original Message-
From: KeN ClarK [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 28, 2001 11:26 AM
To: Lance Prais
Cc: [EMAIL PROTECTED]
Subject:
you have the option of searching via nntp or the web-based list for old
messages at http://nntp.perl.org/group/perl.beginners/
of course, that's how i spend my time, since i'm very NEW, and hence don't
know the answer to your ?...
k
On Fri, 28 Dec 2001, Lance Prais wrote:
>
> I am sorry I a
"Scott.Lutz" wrote:
>
> This is getting a touch off base from where I wanted to go, but the jist
> of what I started with is this.
> Open a .csv file, enter every record into the array, one at a time, then
> copy the first value to the third last value, then print this value back
> to a new .csv
ot;\n";
push (@output, "@string");
print "Line $count parsed with FIRST -> $string[0] and
LAST -> $string[34]\n"; # visual aide
}
$count++;
}
print FOUT @output;
close (FOUT);
-Original Message-
Jenda Krynicky wrote:
>
> But don't ever forget to reset it back! :
>
> { local $, = ", ";
> print @output;
> }
>
> IMHO using join() is safer. I'd only use something like this if I
> needed to interpolate several arrays in a HERE-DOC string. I'd
> change $" then of cour
From: Carl Rogers <[EMAIL PROTECTED]>
> At 02:18 PM 12/17/2001 -0800, Scott Lutz wrote:
> >I was looking for more of a way to print out the array, with
> >inserting a comma (,) between every array value, like while ( @output
> >) {
> > print $output[position] .","
> >}
>
> You can also as
At 02:18 PM 12/17/2001 -0800, Scott Lutz wrote:
>I was looking for more of a way to print out the array, with inserting a
>comma (,) between every array value, like
>while ( @output ) {
> print $output[position] .","
>}
You can also assign the special variable "$," the value "," and it wi
From: "Scott Lutz" <[EMAIL PROTECTED]>
> I was looking for more of a way to print out the array, with inserting
> a comma (,) between every array value, like while ( @output ) {
> print $output[position] .","
> }
>
> or something like that,
> I just figure that there would be
rt
Pacific Online
http://www.paconline.net
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: December 17, 2001 1:35 PM
To: Scott Lutz; [EMAIL PROTECTED]
Subject: RE: output into a csv file
Scott,
I've found the AnyData module (search CPAN for AnyData) to b
Scott,
I've found the AnyData module (search CPAN for AnyData) to be great for CSV.
It can read and write CSV or XML, either tied to hash variables or through a
DBI interface, as well as reading and writing to HTML tables. I've noticed
that it uses the following rules for CSV:
* If field to wr
Tim, I believe I know what you are asking. Normally, CGI returns data in
the form of text/html. This is indicated by including the line
Content-type: text/html\n\n
in the output of your CGI application. This instructs the receiving agent
to treat all data that follows as html text. I believ
> >you just need to provide a link to your file.
> >simply,click here to download my file
> >and the browser,itself will automatically bring that dialog box,
> >whenever user clicks on "Click here to download my file".
>
> I would like to create the file dynamically with a cgi program and send it
I would like to create the file dynamically with a cgi program and send it
to the browser rather than placing an href to a static file. This may not
even be possible, but it would simplify things on my end.
At 04:40 PM 7/24/2001, you wrote:
>you just need to provide a link to your file.
>simp
Hello,
There is nothing wrong in your perl program. The problem is that not all
nic servers produce the same output. The line with "created on" exists
for some names only, not all. I tried yahoo.com which had it and
netscape.com which didn't have it. So, you should figure out a better
way to
This will work.
open outfile ">>outfile.txt";
open cmdoutput " $command |";
while() {
print outfile;
}
close cmdoutput;
close outfile
-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 12:48 PM
To: Perl Beginners
Subject: output of a comman
the man page for the open() function has a section on doing exactly what
your asking for...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
If the hash is going to be built in the order that you want the output
you could use the following module from CPAN
Tie::IxHash
use Tie::IxHash
tie %the_hash, "Tie::IxHash";
... populate the hash in the required order...
foreach my $key ( %the_hash ) {
print $key, " ", $the_hash{ $
At the risk of being over simplistic, can you just add a number_ to the
front of your hash key?
my $rhHash =
{
'4_B' => "Fourth element",
'2_A' => "Second element",
'1_D' => "First element",
'3_F' => "Third element",
};
print "$rhHash->{$_}\
on that note, you can also use the getopt module, that lets you specify
switches like you're used to on any linux system as follows:
script.pl -i input.txt -o output.txt
look at perldoc getopt for a simple description
regards,
Jos Boumans
"Brett W. McCoy" wrote:
> On Thu, 21 Jun 2001, Pedro A
On Thu, 21 Jun 2001, Pedro A Reche Gallardo wrote:
> I am writing a program that creates a file and write some data into it
> using the usual
> open (OUT, ">filename") or die "can't open file '$file'\n"; way
>
> but, how can I make the program to create a file with a name that is
> given as one o
3f", $usr / ($usr + $sys + $wt + $idl);
printf ",%1.3f", $sys / ($usr + $sys + $wt + $idl);
printf ",%1.3f", $wt / ($usr + $sys + $wt + $idl);
printf ",%1.3f,%d\n", $idl / ($usr + $sys + $wt + $idl), $avg;
}
yeah yeah yeah... I'm a newb so sue me!
> -Ori
n" <[EMAIL PROTECTED]>
To: "Yacketta, Ronald" <[EMAIL PROTECTED]>
Cc: "Beginners (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 9:04 PM
Subject: Re: output in specified order
> On Jun 21, Yacketta, Ronald said:
>
> >I have a th
On Jun 21, Yacketta, Ronald said:
>I have a the following hash that _MUST_ be outputed in a specified order
>every time.
You see, that's an ugly combination. You might find a pseudohash useful,
but they're kinda ugly. Perhaps you want the Tie::IxHash module.
--
Jeff "japhy" Pinyan [EMAI
1 - 100 of 105 matches
Mail list logo