On Fri, 26 Sep 2003, Noushad Dawood wrote:
I'm trying to read a huge CSV file which got 30 columns separated by comma,
but i only need to get values of 3rd, 12th and 20th columns. Is there a
neat and easy way to get this done?
One way would be to use an array slice:
while($row=CSV) {
On Fri, 26 Sep 2003, Ken Cornetet wrote:
open FILE blah, blah...
while(FILE) {
chomp;
my @tmp = split /,/;
my $col3 = $tmp[2];
my $col12 = $tmp[11];
my $col20 = $tmp[19];
}
I suppose you could get fancy and use DBI and DBD-CSV.
Or you could use a Cray
Figured it out, mostly.
This disables the arrow key bindings so they don't change the active cell but it also
disables using the arrow keys to navigate text strings within a cell. Is it possible
to turn off cell navigation but still be able to navigate within a cell.
See code below.
use Tk;
Title: Capturing the output of a sytem() command
Am I able to capture the output of a system call?
Currently, I route the output to a temporary file,
then read the contents in when the call is done.
I'd rather not make a temp file.
George
You will need OpenSSL to do that - http://www.openssl.org. I'm not aware of any
modules for creating certs using OpenSSL but there are some existing Perl
scripts that come with OpenSSL which use the OpenSSL binary to create
self-signed certificate authorities which will allow you to create
Title: Capturing the output of a sytem() command
Let me
clarify ths slightly.
I'm
using backticks to run the command, so I can capture the
output.
But
How do I read it sequentially, line by line.
I'm
converting a file from ASCII - BASE64, and want to read
the
converted file directly
Dear Gurus Gurettes.
My apologies in advance for asking such a foolish and ignorant question,
however, I've searched Activestate, CPAN, PerlMonks, etc. and, although it's
probably there I cannot find the help I need. Ergo, I must turn to you for
guidance.
My issue is this ... I need to retrieve
Title: Message
perldoc -q
backticks
-- Mark
Thomas
Thomas.Mark@bls.gov Internet Systems Architect User Technology Associates,
Inc.
$_=q;KvtuyboopuifeyQQfeemyibdlfee;;
y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;
-Original Message-From: George Gallen
[mailto:[EMAIL PROTECTED]
Title: Capturing the output of a sytem() command
Try: @array = `command` using backticks.
STDOUT is sent to an array.
Howard A. Bullock
Global IT Infrastructure
717-810-3584
-Original Message-
From: George Gallen
[mailto:[EMAIL PROTECTED]
Sent: Monday, October 06,
Title: Capturing the output of a sytem() command
Not
sure if you can with system() but you can with backticks:
my
$sys_call = `echo hi there`;print
"sys_call=$sys_call\n";
-Original Message-From: George Gallen
[mailto:[EMAIL PROTECTED]Sent: Monday, October 06, 2003 10:40
Let me clarify ths slightly.
I'm using backticks to run the command, so I can capture the output.
But How do I read it sequentially, line by line.
I'm converting a file from ASCII - BASE64, and want to read the
converted file directly from the base64 conversion routine.
# one way:
use
I have used this
method with great success:
my $cmd =
'cabarc.exe L '.$cabFile;my (@list) = qx/$cmd/;my $status =
$?;HandleError($status,join(' ',@list)) if
$status;
where HandleError is
my own error handling routine.
Am I
able to capture the output of a system call?
Currently, I
I would use:
my $cmd = 'cabarc.exe L '.$cabFile;
my (@list) = qx/$cmd/;
my $status = $?;
HandleError($status,join(' ',@list)) if $status;
foreach my $line (@list){
# Do something
}
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of George
Gallen
Title: Capturing the output of a sytem() command
I
wasn't thinking when I sent this one out.
I guess
if I set it up as returning information into an array, vs a
straigt
$ varible, then I just read it like reading a file into an
array.
Thanks
George
-Original Message-From:
Title: Capturing the output of a sytem() command
You
might just want to try back-ticks :
my
@Results = `cmd`;
-Original Message-From: George Gallen
[mailto:[EMAIL PROTECTED]Sent: Monday, October 06, 2003 10:40
AMTo: [EMAIL PROTECTED]Subject: Capturing
the output of a
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Thomas, Mark - BLS CTR
Sent: Monday, October 06, 2003 11:21 AM
To: 'George Gallen'; [EMAIL PROTECTED]
Subject: RE: Capturing the output of a sytem() command
Let me clarify ths slightly.
I'm
-Original Message-
From: Lynn. Rickards [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 12:43 PM
To: 'George Gallen'; '[EMAIL PROTECTED]'
Subject: RE: Capturing the output of a sytem() command
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
Title: Capturing the output of a sytem() command
You can do something like this.
$results = `$command 21`;
This will redirect STDERR to STDOUT which
is returned to $results.
Hope this helps.
-Original Message-
From: George Gallen
[mailto:[EMAIL PROTECTED]
Sent:
Hello,
I'm using very simple script with MS Exchange server
Inbox is on the same level test.
a)
When I point to my Inbox I see correct number of messages in $msgcount
However I do not see Subject my $subject = $imap-subject($i);
b)
When I use a rule to move message from Inbox to box test
c)
Medlen, Jiri wrote:
$imap-select($folder) or die Could not select: [EMAIL PROTECTED]; # connect to
the
folder 'INBOX/Parent/child'
# get a count of the messages that are present at the time the script is run
my $msgcount = $imap-message_count($folder);
From the documentation re
On Fri, 26 Sep 2003, Erich Beyrent wrote:
Yes I did. I also checked ppm, and Googled a bit. I was looking for
tutorials on how to control Publisher, and was thinking I could probably
use Win32-OLE to do it, but I found nothing.
Has anyone tried this?
It would kinda suprise me if MS
21 matches
Mail list logo