Title: Regular expression question
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Cai, Lucy (L.)Sent: Monday, July 31, 2006 17:21To:
Cai, Lucy (L.); perl-win32-users@listserv.ActiveState.com;
perl-unix-users@listserv.ActiveState.com;
[EMAIL PROTECTED];
[EMAIL PROTECTED]Sub
[EMAIL PROTECTED] wrote:
> Hi,
> Not sure if that is what you want, but I did it once by retrieving
> information from MySQL database and then writing it to .csv file.
> When user clicks in .csv file link, it opens in Excel (IE only)
> Worked for me,
> Regards,
> VM
The real question is wh
Then do a opendir and readdir instead of the
file::find.
Wags ;)
-Original Message-From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]On Behalf Of
Sharp, CraigSent: Thursday, February 23, 2006
12:26To:
perl-unix-users@listserv.ActiveState.comSubject: [Perl-unix-use
[EMAIL PROTECTED] wrote:
> My problem is that arrays are being printed all on one line (as much
> as it can) instead of one line per element. What do I need to do
> with the data?
>
> use Printer;
>
> my @data = ('This is line one','This line two');
Need to add \n for each line or see if
[EMAIL PROTECTED] wrote:
> Hi,
>
> I am not able to split a string and build an array. I am reading the
> lines from a file. I could not understand what I am doing wrong here.
>
> My code is below:
>
> #!/usr/bin/perl -w
> #
> -
Is it possible that the process is being killed externally. If that
happens, the output using backticks might be lost while some or all of
the output will still be written to a file. Maybe it's something along
these lines?
-David
- Original Message -
From: vega, james <[EMAIL P
gly faster (not surprisingly).
I would think that it should at least run in less than 1/2 hour, but
Sun could probably give you a better rating.
-David
On Fri, 20 Aug 2004 12:39:37 +0530, Sandeep Deshpande
<[EMAIL PROTECTED]> wrote:
> Dear All,
> I am working on a very low end machine Ult
It's not recursive, but it should do the job...
my %ids = ();
foreach (@arr1) { $ids{$_}++;}
...
foreach (@arr8) { $ids{$_}++;}
foreach (keys(%ids)) { print $_ if $ids{$_} == 8; }
This assumes that each array contains only unique ids.
-David
On Tue, 17 Aug 2004 08:53:21 -0500, Mehta, Pe
They are the default variables used by sort for their processing.
That is why you want to be careful if you are using the variables $a and $b and
playing with sort besides.
Wags ;) ps to get a descending sort then switch where a and b are
used and it now becomes a descending sort verses a
[EMAIL PROTECTED] wrote:
> hi!
>
> I need to organize a list of values i a hash, but i don't know how.
>
> ex:
>
> my %urls;
>
> $urls{uol} = 1;
> $urls{aol} = 2;
> $urls{txt} = 3;
>
> ## if i use this:
>
> @num = sort keys(%url};
>
> foreach $number(@num) {
>print $number."\n";
> }
try
-Original
Message-From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]On Behalf Of
Márcio OliveiraSent: Tuesday, July 27, 2004 09:13To:
[EMAIL PROTECTED]Subject: [Perl-unix-users]
Simple question about split string
Hi all.
I have a simple (I guess) question
about spliting s
way?
For example:
$myperl.pl
Enter start date: 0710
Enter end date: 0716
Thanks again,
David
-Original Message-
From: Jason Vincent
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 20, 2004 12:31
PM
To: Nguyen, David M;
'[EMAIL PROTECTED]'; '[EMAIL PROTECTE
Meas.atl00.1040.0710
Meas.atl00.1040.0711
Meas.atl00.1040.0712
Meas.atl00.1040.0713
Meas.atl00.1040.0714
Meas.atl00.1040.0715
Meas.atl00.1040.0716
Meas.atl00.1040.0717
Meas.atl00.1040.0718
Meas.atl00.1040.0719
Meas.atl00.1040.0720
Thanks in advance,
David
[EMAIL PROTECTED] wrote:
> Hello all.
>
> I'm trying to return the "ls" method from Net::FTP to an array like
> so: @myarray = $FTP->ls() ;
Change @myarray to $myarray
>
> foreach (@myarray) {
@{$myarray} for @myarray
> print "$_\n";
> }
>
> However, I'm getting in return the fo
Title: RE: [Perl-unix-users] conversion between exponential and corresponding integer value
depending on the format of
the exponential value, it may be as simple as:
print int(10e5); print
int(-10e5);
This doesn't appear to work, though, if formatted as 10e-5, so
you'd need to create a s
Title: RE: [Perl-unix-users] Index of array element
You have it as an array, but if unique, then why not
setup as hash and you would not have to do any searching, but would know right a
way with just a simple test vs searching the whole array each
time.
Wags ;)
-Original Message-
Title: RE: [Perl-unix-users] Removing files older than 10 days from a directory
if ( int( -M
$file) > $days || $days == 0 )
The only thing to be careful is if you
decide to make this a service or constantly running script, using the -M is
the point in time that the script starte
[EMAIL PROTECTED] wrote:
> Subject: [Perl-unix-users] RFC: Unix Sysadmin perl snippets
>
>
> Hello everyone,
>
> I do system administration and programming, and I rely heavily on
> Perl to do both these duties. I find that, in the course of my work,
> I routinely create one-off scripts - snippe
I was asked this question and I have no real answer for the individual.
(Outside of my company)
It is group of Unix flavor servers(group greater 100 servers) and each server
has it's own Perl setup. How do you keep everything in sync?
I would assume you have a test setu
Title: foreach and an array of hashes
learn to use Data::Dumper to see what your data looks
like.
@emp looks like:
$VAR1 = [
{
'position' =>
'Cook',
'age' =>
50, 'name'
=> 'Bob'
},
{
'position' =>
'Receptionist
Byrne, Dermot wrote:
> aha
>
> so I'm using timelocal function now
> but I'm getting
> Undefined subroutine ::timelocal
>
> does this mean there is a seperate timelocal module i need to install?
>
> I've got
> /usr/lib/perl5/5.6.0/Time/Local.pm
> /usr/lib/perl5/5.6.0/Time/gmtime.pm
> /usr/lib/pe
d you turn on the Debug option? What does it say?
--
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect User Technology Associates, Inc.
$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y;
;;print;;
--
David Wein
I am attempting to write a mailing script using Net::SMTP. My code looks
something like this:
$smtp = Net::SMTP->new("foohost");
$smtp->mail("david");#This is line #53 in my program
And I get the following error:
Can't call method "mail" on an undefi
Kwabena,
Here is an example of how to pull off the last character of a string and
print it.
You could also store the value returned by the substr function into a
variable...
$dir='d:/abs/fez';
print substr($dir, length($dir)-1) . "\n";
Here is an example of checking the last character of a strin
Sorry All...
The 'die' command should have read:
die "ERROR: Problem executing grep, ($!), stopped" if ( $? == 2 );
grep return codes: 0=Found Match; 1=No Match Found; 2=Error.
Dave.
-Original Message-
From: Deline, David B.
Sent: Monday, February 18, 2002
The back-tics will automatically execute the grep command.
So,
$var=`grep -E -i -c "abc|xyz|pqr" test.txt`;
will execute the grep command just like from the shell command line.
The output from the grep command will be captured in $var.
You can check the value of $? for the return value from
Is that the exact line...?
Try:
$var=`grep -E -i -c "abc|xyz|pqr" test.txt`;
Remember to put your shell commands in back-tics...
Dave.
-Original Message-
From: ba2984 [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 1:23 PM
To: perl-unix-users
Subject: [Perl-unix-users] Please
Look into DBM files.
I've created a process that is similar to yours (parent process forks
child processes) and they are all daemons. I used a DBM file to
communicate between them. The only draw back was you will have to
implement a file locking schema to prevent corrupting your DBM file.
Regar
I'm using 'tie' & 'untie' in manipulating DBM files for IPC
(Inter-Process Communication).
I know I have to implement a 'locking' strategy to ensure not to corrupt
my DBM files.
1) If I 'tie' to the same DBM file in each of my processes do I ever
need to 'tie' again with in each process...? I'm
d.jeb [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 1:10 PM
To: david.b.deline
Cc: perl-unix-users
Subject: RE: [Perl-unix-users] Frameset
thanks david for your answer, but what i want to do is a repetitive
submision (unlimited) from The QUERY frame to the RESPONSE Frame.
Wh
Well Jeb,
(If I understand your question correctly...)
You can accomplish this by imbedding JavaScript in your query & response
HTML.
You will need to have named FORMs in each of your FRAMEs to use the
following JavaScript examples:
Say you have a text object in your query frame.
You can update
counting down from an arbitrarily high number
you could pack spaces to pad the shorter numbers to be the same (fixed)
width as the largest (first) number printed. Alternatively, there are
some fairly standard routines for clearing a line on a screen. I am
not sure how well they work on Wi
pretty much anything you can write a
rule for. So I don't see how the original poster's problem can be solved
by Perl. A client-side solution in Java may be possible...
David
--
David Cassell, OAO Corp. [EMAIL PROTECTED]
Senior computing specialist
math
33 matches
Mail list logo