Up |
|
|
  |
Author: Richard LeeRichard Lee
Date: May 11, 2008 15:04
I just looked it up on perldoc perlvar, but I am still not sure what it
does.
$^I The current value of the inplace-edit extension. Use "undef"
to disable inplace editing. (Mnemonic: value of -i
switch.)
I was reading perl cookbook and saw this example, and was wondering what
that is....
if (@ARGV) {
$^I = ".orig";
} else {
warn "$0: Reading from stdin\n" if -t STDIN;
}
|
| |
|
| |
2 Comments |
|
  |
Author: Johnson LauJohnson Lau
Date: May 10, 2008 22:09
Dear all,
I need to compare two binary numbers and need perl to return the
number of matching bits.
For example:
$aaa = "10111100";
$bbb = "00101100";
In this case, the number of matching bits is 6.
I know I could split the strings and compare the bits one by one.
However, is there any faster functions for this? I need to compare
millions of such strings with 1000 bits for each.
Thanks a lot!!
Johnson Lau
|
| |
|
| |
6 Comments |
|
  |
Author: Richard LeeRichard Lee
Date: May 10, 2008 16:21
I dont know how to go through the array over and over again pending on
my previous search so I ended up writing it like below which works.. but
looks really really
inefficient..
sub dd_fact {
my $routename = shift;
my $routegroupid;
my $trunkgroupid;
my $carriername;
my $carrier_active;
my $carrierid;
AHI: for (@dat) {
if (exists $_->{outsideroute_group_m}{route_name}
and $_->{outsideroute_group_m}{route_name} eq "$routename") {
$routegroupid = $_->{outsideroute_group_m}{route_group_id};
last AHI;
}
}
|
| Show full article (1.53Kb) |
|
7 Comments |
|
  |
Author: HotkittyHotkitty
Date: May 10, 2008 15:57
I've been trying to setup a connection w/ a shared server at
godaddy.com. The script won't work and when I called them they tell me
that because I don't have a dedicated server that I can't run a perl
script and so I need to upgrade my account. I can access the shared
server w/ PHP....why can't I do it w/ PERL? I've gotten bullsh*t
answers from tech support before so thought I'd check here to see if,
indeed, I need to upgrade my account or switch hosting providers. Is
tech support right?
|
| |
|
3 Comments |
|
  |
Author: Richard LeeRichard Lee
Date: May 10, 2008 07:14
I use this before (split slice ) but it's working bit funny now..
can someone tell me why??
it looks like it's splitting on '' instead of /|/ as I have specified
below... ??
use strict;
use warnings;
my $array = q/hi|how|are|you|fine/;
my ($moe,$hae,$now) = (split(/|/,$array))[0,1,2];
print "$moe $hae $now\n";
[root@RLEE ~]# ./!$
././split_practice.pl
h i |
|
| |
|
2 Comments |
|
  |
Author: Richard LeeRichard Lee
Date: May 9, 2008 22:42
does anyone use perl-support for vim here?
I installed it but having trouble bringing up the menus..
does anyone uses this? and know how to bring up the menu?
If the root menu 'Perl' is not visible call it with the item
"Load Perl Support" from the standard Tools-menu.
-- where is this
standard tools-menu?
|
| |
|
3 Comments |
|
  |
Author: Mark WagnerMark Wagner
Date: May 9, 2008 21:14
Given a string of text, how do I convert it to a string of hexadecimal
values? For example, given the string "Hello", I want the string "48
65 6C 6C 6F".
--
Mark
|
| |
|
3 Comments |
|
  |
Author: Ravi MalghanRavi Malghan
Date: May 9, 2008 12:51
Hi: I have very little knowledge about MQ Series. I have built the MQ Client and MQSeries perl API on my server. My MQ admin also has provided me the name of ques, queue manager, MA CHannel, hostname and port. I am trying to build a simple script that will connect to a que and fetch messages. I have not found any useful examples on the web. Can someone share a code ?
Que Name: TRS.E0.CREATE.REMEDY1
Queue manager: SPBO021T
MQ channel: REMEDY.CLIENT
IP: spbo021t.xx.xx.xx
Port: 1424
Thanks
Ravi
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|
| |
|
no comments
|
|
  |
|
|
  |
|
|
  |
Author: Tony HealTony Heal
Date: May 9, 2008 09:59
I need to remove all messages older than X from a gigabyte size mbox. Anyone
got a script for this?
Tony Heal
Pace Systems Group, Inc.
800-624-5999 x9317
|
| |
|
2 Comments |
|
|
|
|
|