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=) {
chomp
On Fri, 26 Sep 2003, Ken Cornetet wrote:
> open FILE blah, blah...
> while() {
> 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
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;
u
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 an
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 f
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
[mai
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, 20
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:
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?
>Current
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
Sent:
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: G
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.
> -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]
> > [m
Title: Capturing the output of a sytem() command
You can do something like this.
$results = `$command 2>&1`;
This will redirect STDERR to STDOUT which
is returned to $results.
Hope this helps.
-Original Message-
From: George Gallen
[mailto:[EMAIL PROTECTED]
Sent: M
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
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 'message_cou
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
I was trying to execute the followin perl code snipet on a Windows XP system. I used
chomp to trim the trailing spaces, new line character and carriage return. But chomp
does not trim carriage return ('\r') character, due to which the code does not come
out of the loop.
while( $pass1 eq "" || $
- Original Message -
From: "Dax T. Games" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 06, 2003 10:14 AM
Subject: Re[3]: Overiding default bindings in PerlTk
> Figured it out, mostly.
>
> This disables the arrow key bindings so they don't change the active cell but
i
On Fri, 26 Sep 2003, Michael D. Smith wrote:
>
>
> > This is perl, arrays start at zero, get used to it.
>
> Right :)
>
> And to perl you could add C, and it's offspring C++, and Fortran and COBOL
> and JAVA(Script) and... I didn't even know there was one that didn't. I
> know nothing of pascal b
On Fri, 26 Sep 2003, Jay Ay wrote:
> hi there
>
> i want to be able to sort an array of hashes.
>
> for example, i create each hash like this and push it on to the array.
> push(@senddata,{ 'sender' => $se, 'recip' => $re, 'smtphost' => $svr,
> 'number' => $somenbr});
>
> what i want to do is sort
25 matches
Mail list logo