The builtun module Data::Dumper is very essential when working with
data complez structures.
Use strict is very useful for catching programming and user errors
Sent from my iPhone 3GS.
On Oct 4, 2009, at 2:02 PM, Slick wrote:
I am new at this perl thing. I just want to know tips and simple
Checkout www.sf.net and search by programming language you will see
many open source Perl projects to choose from.
Sent from my iPhone 3GS.
On Oct 1, 2009, at 8:12 AM, Xeon Solixa
wrote:
is there any where I could join some kind of development/project team
related to perl, and learn from
These disclaimers are requirements for anyone working in the
securities industry. There isn't much the poster can do about this and
shouldn't be bashed for this. Many of these disclaimers are
automatically appended to everyones out going emails so there isn't
really anything he could have done.
No
On Mon, Mar 30, 2009 at 2:20 PM, ANJAN PURKAYASTHA
wrote:
> Hi,
> Here is my problem;
> I have a series of arrays with 0s and 1s. here is an example: (1, 0, 1, 1).
> I need to parse through this series of arrays and extract the index of the
> 0s in the array.
> Is there any quick way of doing this
On Mon, Mar 30, 2009 at 12:42 AM, Chap Harrison wrote:
> This may be beyond the beginner level I don't know.
>
> I'd like to prompt the user to type in a City, State, and Zip in one line.
> It's free-form, in that it's just for display, but I can make a pretty
> decent "suggestion" based upo
On Thu, Mar 26, 2009 at 9:51 AM, wrote:
> How to achieve a parser with Perl?
> I mean I want to put some logic (if...else, loop etc) in config file and let
> perl to parse them, like TCL for iRules.
>
> thanks.
>
I've used the following in the past and it works very well.
http://search.cpan.or
On Wed, Mar 25, 2009 at 12:00 PM, Rick Bragg wrote:
> I need a quick regex to strip out the following:
>
> example:
> change "remove-all-this (Keep This)" into just "Keep This"
>
$s =~ s/.*\((.*)\)/$1/;
> something like:
> s/ beginning of line up to and including the first ( //g
> s/ starting fr
Look at the documentation for Use require
Sent from my iPhone
On Mar 23, 2009, at 7:41 PM, Chap Harrison wrote:
Hi,
Until now I've written Perl in a quick-and-dirty fashion - single
monolithic .pl file, cutting and pasting from previous code where
convenient, etc. Often I won't even wri
On Mon, Mar 23, 2009 at 9:53 AM, igotux igotux wrote:
> Hi Team,
>
> Can someone explain what is wrong happeneing here ?
>
> $ perl -e 'use Business::ISBN; $isbn_object = new
> Business::ISBN('0-59610-206-2');print $isbn->as_string;'
> Can't call method "as_string" on an undefined value at -e line
Check using a hash of the binary using something like MD5::Digest or
something.
On Sat, Nov 22, 2008 at 11:49 PM, loody <[EMAIL PROTECTED]> wrote:
> > Does that mean I should use "ne" instead of "!="?
> BTW, is there any faster default function provide by Perl library to
> compare 2 binary files?
On Sun, Nov 16, 2008 at 9:01 AM, chillidba <[EMAIL PROTECTED]> wrote:
> Hi ,
> Can any body tells me what do we mean by below code
>
> $ROUTE::COMM{NEWROUTE}{OS()}
>
>
> Thanks in Advance
> a b .
This isnt a Perl command per say, it seems to be a user defined function
unless you post more code
my $string = "Hello";
$string .= " World";
print "Hello " . $string, "\n";
On Mon, Nov 10, 2008 at 10:34 AM, Sureshkumar M (HCL Financial Services) <
[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
>
>
>I have a string like below.
>
>
>
> $string="ABCD";
>
>
>
> While printing , I have to in
What's the correct to walk a HoH like the following?
I built a data structure that looks like what's shown below and need a quick
way to reconstructure the data into an array of arrays.
ie $cfglist[0] = (nybmlx01,'BookManagerDaemon', '1','2','Xbook.jar');
Any assistance will be appreciated than
On Sun, Oct 26, 2008 at 11:35 AM, AndrewMcHorney <[EMAIL PROTECTED]>wrote:
> Hello
>
> Is there a way in Perl to find out why a file failed to open? I am working
> on a script that is opening and reading a lot of files. This script is right
> now being written on a Windows based system.
>
> Andrew
Look at Net::SSH.
On Thu, Oct 23, 2008 at 9:36 AM, monnappa appaiah <[EMAIL PROTECTED]>wrote:
> Hi all,
>
> i need help on something i'm working on.I have 127
> systems connected in the network, i want to write a script which will run
> on
> a management server, i shud be abl
Have you tried the standard Net::SSH does it not work with cisco devices?
On Mon, Oct 6, 2008 at 1:22 PM, Paul <[EMAIL PROTECTED]> wrote:
> I've searched CPAN, but have not found an equivalent module such as
> Net::Telnet::Cisco for SSH (SSH2). Is there one somewhere out there?
> Thanks.
>
>
>
>
On Tue, Sep 9, 2008 at 3:23 PM, <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> i want get the time specified in last line of the file.
> For eg:
> $tail -2 test.log
> 2008 aug 25 14:48:42.800 Sending ping message;
> 2008 aug 25 14:48:43.390 Sending ping message;
> The file size is huge, so i dont want t
On Wed, Aug 13, 2008 at 8:14 AM, Thomas Lovell
<[EMAIL PROTECTED]>wrote:
>
> On Aug 13, 2008, at 4:25 AM, Irfan J Sayed (isayed) wrote:
>
> Hi All,
>>
>> I want to execute one command on remote Linux machine.
>>
>> Following is the perl code.
>>
>> #! /usr/bin/perl;
>>
>> # perl module to parse t
On Mon, Aug 4, 2008 at 12:33 AM, David Newman <[EMAIL PROTECTED]>wrote:
> How to launch a perl script when starting iTerm.app or Terminal.app in OS
> X?
>
> Thanks in advance and apologies for the slightly OT post.
>
> dn
>
Under preferences->startup tab in Terminal.app you can have it launch a
s
On Mon, Jun 30, 2008 at 3:26 AM, Ram <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am begineer to perl language. Want help for the automation of the
> perl script.
> Is it possible to run a perl script at defined time interval without
> cliking over the scipt and using command prompt.
>
> I want it r
On Wed, Jun 18, 2008 at 10:52 PM, Eng. Fadhl Al_Akwaa <[EMAIL PROTECTED]>
wrote:
>
>
> Dear Sir
> I am beginner with perl and I read many things to do what I want.
> I have a text file and I want to extract the column inside the text. the
> problem is that the lines is not length equal.
> please
On Wed, Jun 18, 2008 at 12:27 PM, Graeme McLaren <
[EMAIL PROTECTED]> wrote:
>
> Hi all, I'm in need of a loop, can't seem to find what I'm looking for
> online. I want to loop over this array ref inserting each hash value into
> the DB at each iteration.I've got the following data structure whic
I'm having a hardtime coming up with the correct formula for calculating
percentile on an array of random intergers. Anyone care to assist?
#!/usr/bin/perl -w
use strict;
my @numbers = (10.22,20.33,22.3,11.3,12.4,8.3,10.4);
sub calc {
my ($p,$n) = @_;
return $p/100 * ($n + 1);
}
printf "Perce
On Thu, Jun 12, 2008 at 5:28 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
> Hi there,
>
> I am stuck with something here.
> What does the following piece of code mean?
>
> my @temp1;
> my @temp2;
> $cnt=0;
> $temp2[$cnt] = [EMAIL PROTECTED];
>
> What is the kind of data stored in $tempFieldNam
On Thu, Jun 12, 2008 at 4:49 AM, Santosh Reddy <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I am having some prstat log files. From which i want to make some graphs.
> Any pointers are greatly appreciated.
Checkout rrd (Round Robin Database) they're also bindings available for
perl.
>
> --
> Thanks & R
On Thu, Jun 12, 2008 at 12:15 AM, beast <[EMAIL PROTECTED]> wrote:
> Hi All,
>
>
> Why this following code has not working as expected?
>
>print "Number of element(s) : " . sprintf("%10d", keys(%hash) ) . "\n";
>
Try: print "Number of element(s): " . sprintf("%10d", scalar keys(%h)),"\n";
>
Can someone take a look at the following sample code and let me know if you
see any areas I can improve upon I tend to use the same structure when
parsing txt files and before I commit this convention into memory maybe one
of you guru's could let me know what I can improve upon.
Thanks
#!/usr/bi
On Sun, Jun 8, 2008 at 10:37 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]>
wrote:
> Rodrick Brown wrote:
>
>>
>> #!/usr/bin/perl -w
>>
>
> The -w switch is redundant, since you have "use warnings;".
>
> use strict;
>> use warnings;
>
' => {
'_www',
'apache'
},
}
On Sun, Jun 8, 2008 at 5:22 AM, John W. Krahn <[EMAIL PROTECTED]> wrote:
> Rodrick Brown wrote:
>
>> I'm trying
I'm trying to fully understand references so I created a data structure to
stores the output of users on my system who share home dirs.
I use a HoH to represent this data set but its not working as expected.
Conceptually I can visualize how the data should look but I cant get the
output any assista
my $arrayRef = [ 1, 2, 3, ['a', 'b', 'c', ["Hello"] ]];
I have no problem returning single elements but how would one walk this list
of elements with say a for loop?
On Thu, May 22, 2008 at 12:39 PM, Bobby <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a flat file that contains a pid, us_size and euro_size. I want to
> create read in the file and create one hash for the us_size (%US) and the
> other for the euro_size (%EURO). Then i want to do a print statem
You can install modules locally into say ~/perllib and set PERL5LIB
accordingly this works very well if you're home directory is also nfs
mounted on each server.
On Sun, May 18, 2008 at 11:22 PM, Richard Lee <[EMAIL PROTECTED]> wrote:
> so just to put it out there for my ideas to run more perl scr
On Wed, Apr 16, 2008 at 7:05 AM, <[EMAIL PROTECTED]> wrote:
> Hi All,
>
>
>
> I need to execute the "export CCASE_NO_FILE_HEADER=yes" command through
> Perl script.
>
>
>
> What I did is qx(export CCASE_NO_FILE_HEADER=yes); but still the value
> for CCASE_NO_FILE_HEADER is not getting set to "
On Tue, Mar 11, 2008 at 2:46 PM, Rodrick Brown <[EMAIL PROTECTED]> wrote:
>
> On Tue, Mar 11, 2008 at 2:23 PM, <[EMAIL PROTECTED]> wrote:
> > Hi,
> > How do I shorten this code:-
> >
> > if $playercard1 = 10 or $playercard1 = "J" or $playerc
On Tue, Mar 11, 2008 at 2:23 PM, <[EMAIL PROTECTED]> wrote:
> Hi,
> How do I shorten this code:-
>
> if $playercard1 = 10 or $playercard1 = "J" or $playercard1 = "Q" or
> $playercard1 = "K";
>
> Thanks
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL
On Mon, Mar 10, 2008 at 1:37 AM, igotux igotux <[EMAIL PROTECTED]> wrote:
> Hi,
> I want to extract values from split without defining an array. Say i want to
> access second element in the split output :- split (/\s+/,$var) . I tried
> split(/\s+/,$var)[1] which is not working as i expected. C
looks like local user error are you sure the credentials your
supplying are correct?
On Thu, Mar 6, 2008 at 4:13 PM, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I'm trying to access a local CPAN mirror over FTP and am unable to
> connect.
>
> cpan> reload index
> CPAN: Storable lo
#!/usr/bin/perl
my $p = 10;
if( int($p) ) {
print "$p is an interger\n";
}
~
On Tue, Mar 4, 2008 at 3:16 PM, <[EMAIL PROTECTED]> wrote:
> Hi All,
>
>
>
> How to find out the specific variable contains integer value. In my
> script ,variable is storing some value but I want to find out whethe
Just use Python *ducks*
On Feb 18, 2008 10:17 PM, Robert Hicks <[EMAIL PROTECTED]> wrote:
> Is Damian Conway's book still the best way to get a good comprehensive
> education about doing OO in Perl?
>
> Robert
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [
On Jan 26, 2008 9:38 AM, John Kufrovich <[EMAIL PROTECTED]> wrote:
> Time,TemperatureF,DewpointF,PressureIn,WindDirection
> 2007-01-23 00:01:00,43.3,34.9,30.14,North,359,7,8,72,0.00,,,0.00,Wunderground
> v.1.13,
> 2007-01-23
> 00:06:00,43.2,34.8,30.14,North,354,11,11,72,0.00,,,0.00,Wunderground
On Jan 26, 2008 9:38 AM, John Kufrovich <[EMAIL PROTECTED]> wrote:
> Time,TemperatureF,DewpointF,PressureIn,WindDirection
> 2007-01-23 00:01:00,43.3,34.9,30.14,North,359,7,8,72,0.00,,,0.00,Wunderground
> v.1.13,
> 2007-01-23
> 00:06:00,43.2,34.8,30.14,North,354,11,11,72,0.00,,,0.00,Wunderground
On Jan 10, 2008 4:39 PM, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I'm writing a script that basically creates a bunch of files, packages
> them up (tar/gz), and mails them out.
> I can handle all of that, but before I mail them I also have to password
> protect the archive like
perl -nle '$total+= (split/\s+/,$_)[4]; END { printf "Avg: %.2f\n",
$total/$. } ' /tmp/filename
On Dec 7, 2007 7:36 AM, <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am not very good at perl however our systems use it and I am trying
> to write a few scripts to help our staff.
>
> I am trying to calcula
Try contacting the author
On Nov 22, 2007 8:51 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Is it correct to use such syntax:
> ...
> use MQSeries qw(:functions);
>
>
> I try to use MQSeries modules and have errors like this:
>
> "functions" is not defined in %MQSeries::EXPORT_TAG
On Nov 13, 2007 4:33 AM, <[EMAIL PROTECTED]> wrote:
> HI
>
>
> my conditions are
>
>
> //Code length rule (Min - 6 and Max-8)
>
> //leftmost character must be alpha character rule
>
> //first character of inward code must be numeric rule
>
> //second character of inward code must be alpha rule
>
>
On Nov 8, 2007 3:32 PM, Demian <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I ran into a problematic file that combined two numeric columns into
> one:
>
> ATOM325 CA GLU B 40 -30.254 72.432-297.620 1.00
> 10.00 C
> ATOM326 CA ASP B 41 -28.149 73.031-294.529 1.00
> 1
ActivePerl makes a decent IDE for perl and python I'm still a VIM man myself
so I cant really comment.
On 11/3/07, Richard <[EMAIL PROTECTED]> wrote:
>
> Running (K)ubuntu Linux, what would be the best programmers editor for
> Perl
> looking for a IDE or RAD developers environment or a super text
On 27 Sep 2007 14:47:42 -, vikram vikram vikram
<[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I am new to perl. I am using "Active Perl-5.8.8"
>
> I want to set environment variable in a perl script
>
> Ex - #!/usr/bin/perl
> $ENV{HAI} = "hai"
On 9/21/07, Santana <[EMAIL PROTECTED]> wrote:
> Hei all,
> how print a hashtable elements in a function that receives the
> reference of
> this hastable ???
>
>
> In this example this foreach loop in "printHT" function dont work ,
> how is missed ?
>
> #!/usr/bin/perl
> use strict;
> use warnin
On 9/7/07, Santana <[EMAIL PROTECTED]> wrote:
> Hei all,
> i'am a newbie in PERL and i find a solution for this problem :
>
> I have a string "xxx" , i want put ones("1") on left of string, if
> this string dont have a length of 20 character.
>
> Example :
>
> if i have th string "HELLO" and wo
On 8/25/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
> 2007/8/26, Rodrigo Tavares <[EMAIL PROTECTED]>:
> > Hello,
> >
> > In many languages there is a function for convert int
> > for string. Ho I can do it in Perl ?
> >
>
> Hello,
>
> Perl isn't a strong type language like C,so you don't have the need
On 8/22/07, Mário Gamito <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Sorry for the newbie question, but I've searche over the web and couldn'
> find an answer to what I need.
>
> I need to clean all the ocorrences of the "##Z/" string (without the
> quotes), from a series of .html files located in a singl
On 7/27/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote:
> Hello,
>
> How I can to make this program, where the variable is
> enter though , how separete the digits ?
>
use split
>
> Exercice
> 01)Write a program than user type five digits,
> separates the individual digits of number, and print
> th
Is there a more efficient way to handle the method I choose to unroll my HoH.
Thanks.
#!/usr/bin/perl -w
use strict;
use warnings;
use Data::Dumper;
my @data = ;
my ($user,$gid,$homedir,%userMap);
foreach(@data) {
/^#/ and next;
/(\w+):/ and $user = $1;
/\w+:*:(\d+):/ and $gid = $1;
/.*:(.*
@list = map { $c = $_; $c =~ s/\s+/_/g; $c } @d = grep { /\d/ } ;
Is there a way to shorten the following mostly concerned with why I
have to use a temporary variable.
Thanks.
--
Rodrick R. Brown
http://www.rodrickbrown.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
On 6/24/07, Mihir Kamdar <[EMAIL PROTECTED]> wrote:
Hi,
I have a csv file having 3rd field as phone number series. In that field,
some of the records are phone number ranges like 097611/4
Now I need to seperate this into 4 numbers and store them one after the
other, like:-
097611
097612
097613
I see this used a lot but never really understod it the documentation
also seems very vague. Anyone care to explain the following:
-M OPERAND Returns the age of OPERAND in days when the program started.
Thanks.
--
Rodrick R. Brown
http://www.rodrickbrown.com
--
To unsubscribe, e-mail: [EMAIL P
I have a few hundred records in a file like the following
a:1
a:2
a:3
b:1
b:2
b:3
I'm trying to build a hash of where the values on the left is the key and
for each value on the right is an array containing the coresponding values I
hope this makes sense
$a{$a} = [EMAIL PROTECTED] where @value
On 5/3/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
I have been given a task of installing a piece of backup software, then tarring
up all of the associated files in order to automate the installation onto other
machines. The only way I can think of doing this is to do an ls -l on / and
then doi
On 5/1/07, Maphin Philip <[EMAIL PROTECTED]> wrote:
I am using postgres8.2 in netbsd OS
1.How to install perl here?
Look at your netbsd ports collection documentation on how to install
software on your system using the facility.
2.Can we use perl programs for manipulating data in postg
On 4/29/07, Goksie <[EMAIL PROTECTED]> wrote:
hello,
Can someone help me correct this code.
if i print, it only print the first line.
Goksie
#!/usr/bin/perl
use strict;
my $test =
'NAS-IP-Address = 192.168.42.1
Quintum-NAS-Port = "0 0/0/c1dc2a26"
NAS-Port-Type = Async
Use
On 4/27/07, Somu <[EMAIL PROTECTED]> wrote:
Please give me one simple example using glob.. I saw the perlopentut,
and perldoc -f open, and perldoc -f glob, but i am unable to make out
anything from them.. I know only how to open files which are in the
same dir or child dir.. But suppose i am in d
Perfect canidate for Map.
On 4/26/07, Pierre Mariani <[EMAIL PROTECTED]> wrote:
Hello everyone,
I have a 'modify_variable' function that, well, modifies a variable.
I want to run it on several variables.
I have the following code that:
- builds an array of references on the variables,
- calls
I'm testing a regex with the sample data
Chicago Bulls 55 66
Miami Heat 13 44
Alpha Dogs 22 48
Hornets 84 22
Celtics 22 24
while($line = )
{
$line =~ m/((\w+\s+)?\w+)\s+(\d+)\s+(\d+)/;
($team,$wins,$losses) = ($1, $3, $4);
print $team;
}
I came up with the following regex to map team n
On 4/11/07, Craig Schneider <[EMAIL PROTECTED]> wrote:
Hi Guys
Thanks for all the help with the directory sorting, I'm still very new
to Perl :)
I'm now trying to use Perl to convert the below log file to CSV.
1176301248.555180 dhr-hr3.duys.co.za TCP_MISS/200 447 GET
http://support.duys.co
I have a data file with the following about a thousand or so records.
=== XX01 ===
0
x01
I performing the following match to just pick out the strings
while()
{
if( $_ =~ m/^=+\s(\w+)/ )
{
$hostname = lc $1;
}
print $hostname . "\n";
}
some
Instead of making spaghetti just rewrite the entire script in Perl
On 4/3/07, Nath, Alok (STSD) <[EMAIL PROTECTED]> wrote:
Hi,
Before starting my problem I just want to thank all the active
members
who had literally mentored me in learning perl.
I have bunch of this bash sc
68 matches
Mail list logo