Hi all!
I have this while loop in my script:
while (($type ne Windows) || ($type ne Linux)) {
print Enter TYPE of server to build. Linux or Windoze [linux, windows]:\n;
$type = STDIN;
chomp $type;
$type =~ tr/a-z/A-Z/;
if (($type eq LINUX) || ($type eq L)) {
$type = Linux; }
if (($type eq
Hi All -
This script:
use strict;
use warnings;
my $string = 'I love c++';
my $compare = 'some compare string';
if ($compare =~ /$string/) {
print $compare contains $string\n;
} else {
print $compare does not contain $string\n;
}
gives this error:
Nested quantifiers in regex; marked
Hello,
I have to get the size and last modified date of a remote file via URL without
reading in the whole file. I have gone through LWP::UserAgent but couldn't make much
headway. Any pointers on how to do it would be appreciated.
TIA
Shishir
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Hello,
I have to get the size and last modified date of a remote file via URL without
reading in the whole file. I have gone through LWP::UserAgent but couldn't make much
headway. Any pointers on how to do it would be appreciated.
TIA
Shishir
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Hello,
I am running Active state Perl 5.8.0 on Windows 2000 Professional.
I am trying to run simple script that tries to parse an XLS file. The script name is
x.pl and the xls file that it tries to open is x.xls and they both exist in the same
directory.
x.pl
#
Hello,
I am trying to locate the perl code for the opcode -B or stat but I am getting lost
in the maze of all the files. Would appreciate it if someone could pls direct me to
the actual file where the algo for -B file test switch lies.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Try using it like this
-
use strict;
my $cache = {};
test(hello0,$cache);
test(hello1,$cache);
test(hello0,$cache);
test(hello3,$cache);
sub test {
my $param = shift;
my $cache = shift;
my $cache_key = param=$param;
if (exists
And pack too
perldoc -f pack
perldoc -f split
That should solve your purpose
-Original Message-
From: David Olbersen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 5:18 PM
To: Gorden-Ozgul, Patricia E; [EMAIL PROTECTED]
Subject: RE: PipeDelimited Input / Three File Output
You may want to handle them as
$intHash1Ref = {'A' = 'B'};
$intHash2Ref = {'C' = 'D'};
%containerHash = ('hash1' = $intHash1Ref, 'hash2' = $intHash2Ref);
foreach my $hashRefKeys (keys %containerHash) {
foreach my $hashKeys (keys %{$containerHash{$hashRefKeys}} ) {
print $hashKeys,
$hashKeys,, $hashRef-{$hashKeys},\n;
}
}
-Original Message-
From: Shishir K. Singh
Sent: Monday, March 03, 2003 12:42 PM
To: 'Hanson, Rob'; 'Yannick Warnier'; [EMAIL PROTECTED]
Subject: RE: adding hash reference into hash
You may want to handle them as
$intHash1Ref
Hello,
Is there any existing module that can list all the subdirectories/files within a
given directory?
TIA
Shishir
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
:26 PM
To: Shishir K. Singh; [EMAIL PROTECTED]
Subject: RE: Display DubDirectory/Files
Shishir K. Singh wrote:
Hello,
Is there any existing module that can list all the
subdirectories/files within a given directory?
TIA
Shishir
You can use File::Find to pull out what you want
Message-
From: Dan Muey [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 2:27 PM
To: Shishir K. Singh; [EMAIL PROTECTED]
Subject: RE: Display DubDirectory/Files
Hello,
Is there any existing module that can list all the
subdirectories/files within a given directory
Hello,
How can I divide my perl program in different files(in other words..move the sub
routines in different files ) and then do an include in the mail perl file. The reason
why I want to do this is because my main program is growing day by day and it's
becoming difficult to navigate through
Thanks to everyone, it works.
-Original Message-
From: Chris Rogers [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 4:58 PM
To: Shishir K. Singh; [EMAIL PROTECTED]
Subject: RE: Divide Perl script
Just create a separate file to hold your library routines. You may name
-Original Message-
From: Thomas 'Gakk' Summers [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 8:34 AM
To: [EMAIL PROTECTED]
Subject: File testing
Warning: Perl Novice Alert!
I'm trying to:
1. read in a list of files,
2. test for text,
3. convert the text files from
There is a modeule XML::Parser ..something like this which you can look into.
You can also write your code as
open(XML, x) || die(Cannot open file \n);
my $i = 1;
my %hash_try;
while(XML) {
chomp;
if (/test_number/) {
/(test_number)(.*?)\/(\1)/;
if (defined $2) {
$hash_try{$i} =
Nope..this won't work. Why don't you loop over the list and do a substring or pack as
you know that you need to keep only the first 4 characters of each element?
-Original Message-
From: Shaun Bramley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 4:24 PM
To: [EMAIL
Is there a keyword for moving a set of files from one dir to another
eg like doing
move (*.log , /tmp/) without the use of glob or individual file looping.
Thanks
Shishir
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
use hashes.
my %HASH;
$HASH{$_}++ foreach @arr1;
delete $HASH{$_} foreach @arr2;
@arr1 = keys %HASH;
@arr1 now has ( one three five );
Perhaps If you want to maintain the order in the array, you might use it this way:
my %HASH;
my %hORD;
my $count = 0;
$HASH{$_} = ($count++) for @arr1;
pkgadd is one of the tools used in the Solaris implementation
of the SYS V packages model.
cf man pkgadd
For my money - it would be simpler to use the pkgadd command
on a Solaris Box.
f also the regular suite of tools
pkginfo
pkgrm
.
if the folks at
p0: which rev of Solaris are you working with?
eg: both the OS rev 5.X and the Arch - sparc XOR i386
Machine hardware: sun4u
OS version: 5.8
Processor type: sparc
Hardware: SUNW,Ultra-5_10
p1: are you using gunzip to deal with unpacking them?
gzip -d/gunzip
Looks like you got an incomplete download.
Try re-dl-ing it.
I think it wouldn't have gunzipped in the first place if the file was incomplete.
gzip -t ActivePerl-5.6.1.633-sun4-solaris.tar.gz returns success.
But just to be on the safe side, I repeated the download/unzip process 3
Well...you are checking for REVERSE whereas you should check either for REVERS or
REVERSAL
-Original Message-
From: Gary Stainburn [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 11:08 AM
To: [EMAIL PROTECTED]
Subject: condition problem
Hi all,
I've got the following code
I took a look on www.perldoc.com and checked out split. I can't figure out how to
do it from the examples?
Help?
Try out the following piece of code :
use File::Spec;
use strict;
my $test = C:\\temp\\test\\filename;
my ($volume,$directories,$file) =
I've been pounding perldoc for a while this morning trying to find a
clear technique described to add directories to @INC (permanently).
I'm sure its described somewhere but I'm not finding it.
I know about the -I switch method but wanted to add certain
directories permanently so perl -V will
I have a series of flags that I need to change all at once, and then
change back, and was wondering if I could use an array or hash to do
this.
I am parsing an RTF file, and when I find a footnote, I need to preserve
the flags of the non-footnote text. So if I was in a table, I need to
save the
I've been pounding perldoc for a while this morning trying to find a
clear technique described to add directories to @INC (permanently).
I'm sure its described somewhere but I'm not finding it.
I know about the -I switch method but wanted to add certain
directories permanently so perl -V will
I've been pounding perldoc for a while this morning trying to find a
clear technique described to add directories to @INC (permanently).
I'm sure its described somewhere but I'm not finding it.
I know about the -I switch method but wanted to add certain
directories permanently so perl -V will
and replace with hash value?
ok now how to build this on the fly using %hash
([12])
On Thu, 1 Aug 2002 16:01:24 -0400, [EMAIL PROTECTED] (Shishir
K. Singh) wrote:
You forgot to put the brackets () around [12]
$line =~ s/([12])/$hash{$1}/g;
-Original Message-
From: chris [mailto:[EMAIL
I was just wondering if there is anything similar in perl for unix commands pushd /
popd ??
Thanks
Shishir
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hmmm..they are array functions...I guess I can use the cwd/push/pop to simulate the
pushd and popd, just was being lazy :) and wanted to know if a direct pushd popd kind
of function exists!!
how about functions like push, pop, shift, unshift ?
-Original Message-
From: Shishir K
I was just wondering if there is anything similar in perl for unix
commands pushd / popd ??
I can't find such a thing. You (or someone else) could write one. It
doesn't seem too difficult; it's just an array.
Good Idea!! might as well do that!!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
I was just wondering if there is anything similar
in perl for unix commands pushd / popd ??
pushd and popd are built-in shell commands, they aren't really Unix
commands. What exactly are you trying to do?
perldoc -f push
perldoc -f pop
perldoc -f shift
perldoc -f unshift
perldoc -f
Thanks John...I appreciate it!!
I was just wondering if there is anything similar
in perl for unix commands pushd / popd ??
pushd and popd are built-in shell commands, they aren't really Unix
commands. What exactly are you trying to do?
perldoc -f push
perldoc -f pop
perldoc -f
Which one is the more preferred : perl2exe or perlapp (Active state Perl Development
Kit). I have not done much with perlapp and I did run into small problem using
perl2exe. Just wanted to know their merits.
Thanks
Shishir
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
I know this has been covered before, so a faq pointer is ok w/me.
I have this code:
while($db-FetchRow()){
%Data = $db-DataHash(First_Name,Last_Name);
foreach $key (sort(keys %Data)) {
print $key, '=', $Data{$key}, \n;
} # end foreach
print(\n);
}
Just curious. I
Why not use sort on the array and get the last element which would be the highest??
my @sorted = sort @list;
my $max = $sort[$#sorted];
Wouldn't this work ? I a not sure about the speed though!!
Here is a routing that i use:
--
@nums = (5,6,3,7,2,9,12,46);
$rv = min(\@nums);
print $rv\n;
Seems this has already been proposed by Nikola!! I like this approach as it's in the
spirit of Perl and a one liner :)!!
Why not use sort on the array and get the last element which would be the highest??
my @sorted = sort @list;
my @sorted = sort
my $max = $sorted[$#sorted];
Wouldn't
Hello all,
I'm trying to get this line to work
(!$opt_Z) ? die Must supply Market\n : $mkt = $opt_Z;
and I keep getting compiler errors.
$mkt = (defined ($opt_Z)) ? $opt_Z : die(Must supply Market\n);
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Better use defined on $opt_Z , cause it will die even if $opt_Z has 0 , '0' or space
!!
Hello all,
I'm trying to get this line to work
(!$opt_Z) ? die Must supply Market\n : $mkt = $opt_Z;
You need parens because assignment is lower precedence than ternary:
(!$opt_Z) ? die Must
Try using the fetchrow_arrayref. I think it's faster as it does not have to copy the
variables. Since your length is 2000, it may help a lot.
-Original Message-
From: Jackson, Harry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 12:10 PM
To: '[EMAIL PROTECTED]'
Subject:
I'm new to perl, but have a background in C.
Can someone tell me what is the difference between 'use' and 'require'? When do you
use one and not the other? Seems they both are comparable to a C header file (.h).
Thanks in advance.
use is resolved during compile time whereas require is
Hello - I am trying to use ActiveState perl on windows and I am trying
to figure out how to chdir to a parent directory. I have tried the
following:
chdir (..);
chdir (\\..);
chdir ('..');
chdir ('../');
Use single quotes. so that special characters are treated as literals. . and \
are
Thanks! Changing:
my $message = @_;
to:
my ($message) = @_;
did put the correct value in the string.
If anyone cares to explain the difference between the code I had and the code
Shishir suggested so I can understand why this makes a difference, I'm all
ears!
@_ is an array.
You were
I need to write a script that is reading line by line through a file and put it into
a hash of an array that looks like this:
This is just an example, so it looks like garbage. This is what I need to capture
in memory and also if I was to print it, it needs to look like this in a list. My
I have a c program which takes two commandline arguments (both strings) and
prints out a line. If I use system then I am not able to grab the output of the
program and if I use backquotes `` then the arguments are also treated as
commands and I get an error.
Is there any other way to do
On Tuesday, July 2, 2002, at 11:23 , drieux wrote:
I have a c program which takes two commandline arguments (both strings)
and
prints out a line. If I use system then I am not able to grab the output
of the
program and if I use backquotes `` then the arguments are also treated as
Shouldn't your query add the $Cust_ID too ??
$sql = select * from product,order_line where prod_num = product_id and
order_num = $order_id;
How is this query going to identify a particular customer ??
--
I'm not sure if
on Sun, 30 Jun 2002 12:08:23 GMT, Dan Fish wrote:
What is the most efficient (or at least AN efficient :-) way of
obtaining a slice from an array wherein the slice contains only
unique values found in the array?
See
perldoc -q duplicate
--
felix
This is the example d cited in
I would use the Tk module.
But I think there is also a Win32::GUI module. (or something like that)
I would always go for Perl TK. But beware!! If you want to use some of the derived
widgets...they suck !! eg ..BrowseEntry and DirTree. I had to modify them to bring
back some sanity. Bur the
Mastering Perl Tk I guess is the better one!!
-Original Message-
From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 11:12 AM
To: 'stephane groux'; Joe Echavarria
Cc: [EMAIL PROTECTED]
Subject: RE: Perl Win32 Application.
Why do I get the feeling that I was
I would always go for Perl TK. But beware!! If you want to use some of
the derived widgets...they suck !! eg ..BrowseEntry and DirTree. I had
to modify them to bring back some sanity. Bur the best part is it
works on UNIX as well as on Windows.
Did your patches make it into the main
-Original Message-
From: Shishir K. Singh [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 11:30 AM
To: todd shifflett; [EMAIL PROTECTED]
Subject: RE: extracting a string from between parens
I have this situation:
$in = 02 Jul 5.00 (YHZ GA-E)
I want
I have this situation:
$in = 02 Jul 5.00 (YHZ GA-E)
I want:
$out = YHZGA-E
How do I extract the information between the ()s ?
Other than the parens all other characters are likely to change.
Perhaps
$in =~ /\((.*?)\)/;
$out = $1;
This is a problem if there is no
On Wednesday, June 26, 2002, at 08:48 AM, Shishir K. Singh wrote:
$out = $1 if ($in =~ /\((.*?)\)/);
Nope..won't work..I take it back!!
looks ok to me. except it adds extra strokes to previous answer.
what do you think is wrong with it?
It will work fine as far as the regex is concerned
On Wednesday, June 26, 2002, at 08:48 AM, Shishir K. Singh wrote:
$out = $1 if ($in =~ /\((.*?)\)/);
Nope..won't work..I take it back!!
looks ok to me. except it adds extra strokes to previous answer.
what do you think is wrong with it?
It will work fine as far as the regex
I have a perl scipt that emails certain information to me. I would like a
certain line to be in bold or a different color when it is emailed. Is there
a way to do this?
Ernest P. Tucker II
Network Technician
Madison Management Area
Charter Communications
I can get up at nine and be rested,
Include this line in the header:
Content-Type: text/html
And then just write out the rest as simple HTML.
It's been a while since I've done it, but if you send it like this, I think
it should work.
From:[EMAIL PROTECTED]
To:[EMAIL PROTECTED]
Subject:HTML Mail
content-type: text/html
What about the Color ??
why not learn how to write html ?
http://www.google.com/search?hl=enie=UTF-8oe=UTF8q=html+tutorialsbtnG=Google+Search
Honestly...I have always dreaded HTML with all those tags!! Makes my head spin:). But
then there's no way out of it:(.
--
To unsubscribe,
Hello all. I have an interesting problem that I may be able to solve with
perl. I would like to know if anyone thinks this is possible. I want to have
a perl program that runs on computer A. Every hour or so, it will attempt to
connect to computer B. If computer B is alive and has a seperate perl
Hi everybody,
Hopefully some of you will help to solve my problem!!
I'm trying to parse a flat file formatted file. It's a PDB (Protein Data
Bank).
But I didn't find any script on internet and perl.com.
If you'll help me, I will be happy and solve the problem..
Thank you.
Bryce
Can You
I'm trying to find a way to match anything between two brackets [] The stuff in
between will have alpha, numeric, and symbols (including / - @ and spaces)
For instance
[akens@egh-org blah/blah/blah]
I need to match that entire string, including the []'s
Here's the ugly thing I've
Howdy:
I'm trying to do the following (which may have
been created already) in perl:
* create two variables
var1 = this will be sunday of current week always
var2 = this will be saturday of current week always
I'm not sure how I can use 'localtime' as a tool
for identifying var1 and var2.
I
Howdy:
I'm trying to do the following (which may have
been created already) in perl:
* create two variables
var1 = this will be sunday of current week always
var2 = this will be saturday of current week always
I'm not sure how I can use 'localtime' as a tool
for identifying var1 and var2.
Hi expert,
I am install a Bioinformatics application, which is useperl module. In Makefile.PL,
there is 'use 5.6.1;', but I have only perl5 (5.0 patchlevel 5 subversion 3), and I
have no 5.6.1 module. I search CPAN, I can not find this module, do I need install
perl5.6.1, do I have other
Hi everybody,
I've done a dummy test, and finalized that David's method is the
Goal Method, that's really Really Very Great !!!
I've made a 50MB Text file ( Fixed length, 1001 char per line, with \n)
for this test, and have the following results :
SCRIPT 1 # Suggested by Johnson
Hi all,
I would like to match a string variable in a longer string retreiveing
the match plus 5 extra characters at each side of the
match.
This what I mean:
$var = 'something';
$line = 'SDFGHAsomethingWDFTsft';
and, I would like to get in a new variable the string
'DFGHAsomethingWDFTs'.
Any
(@pop) {
$code .= \tif (\$line =~ /\\b$state\\b/) {print \$line;next;}\n;
}
$code .= '}';
eval $code;
die if @!;
#
-Original Message-
From: Shishir K. Singh [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 5:07 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED
Hi,
Hello,
I need to format a string in a fixed width field. The string
may be less than the length of the format, or may be greater.
If less, then it should get padded with spaces (left or right
justified , like using - in sprintf), if greater, then the
string should get truncated to
Hi,
I need to format a string in a fixed width field. The string may be less than the
length of the format, or may be greater. If less, then it should get padded with
spaces (left or right justified , like using - in sprintf), if greater, then the
string should get truncated to the exact
Hi,
I have a C program. In there is a function that I need for perl. This is the first
time I am dealing with the C / Perl Interface. Is there any detailed reading material
on how it's done ?? Any guidance would be highly appreciated.
Thanks
Shishir
--
To unsubscribe, e-mail: [EMAIL
.
-Original Message-
From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 10:06 AM
To: Shishir K. Singh; [EMAIL PROTECTED]
Subject: RE: C from Perl
What's the C function? Is it something standard in C?
Or did you/someone write it?
and the big question:
What does it do
Wouldn't you be needing something like perl2exe or perl2app?? Oops, one problem...they
come for a price!!
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 10:22 AM
To: 'Nigel Peck'; [EMAIL PROTECTED]
Subject: RE: Code Generating/Compiling
push (@myVar, @$_) for @$stats;
push (@myVar, @$_) for @$totals;
push (@myVar, $_) for @$loads;
-Original Message-
From: Kipp, James [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 10:32 AM
To: [EMAIL PROTECTED]
Subject: combining data structures into one array
I have a
: Shishir K. Singh
Sent: Tuesday, June 18, 2002 10:55 AM
To: Kipp, James; [EMAIL PROTECTED]
Subject: RE: combining data structures into one array
push (@myVar, @$_) for @$stats;
push (@myVar, @$_) for @$totals;
push (@myVar, $_) for @$loads;
-Original Message-
From: Kipp, James
Do you mean to say
push (@$stats, @$totals, $loads);
didn't work ??
-Original Message-
From: Kipp, James [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:23 AM
To: Shishir K. Singh; Kipp, James; [EMAIL PROTECTED]
Subject: RE: combining data structures into one array
I am
Hi,
Is there a way to get the number of lines in a file. Conditions:
a) Without using backticks on wc -l
b) Without opening the file and looping over the records
Thanks
Shishir
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Probably the record is like
$split_cellname = ABCDEFGHIJK:12345678
($cellname = $split_cellname) =~ s/:.*//;
$cellname will now have ABCDEFGHIJK
$split_cellname =~ s/:.*//
= substitute any character starting with : till the end of the string (s/:.*/), in
$split_cellname, to NULL (//)
Uh oh!! Thanks !! Guess I will have to do it the old fashioned way!!
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:51 AM
To: Shishir K. Singh; [EMAIL PROTECTED]
Subject: RE: No of lines in a file
-Original Message-
From
],
etc
];
so i want to end up with something like:
@stats = (
[oracle, 6.8, 11.2,15.8, 17.2 ],
[ksh, 1.8, 1.2, 3.7, 3.9 ],
etc...
);
thanks.
-Original Message-
From: Shishir K. Singh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:04
Think you need to use \Q$string\E
-Original Message-
From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 11:05 AM
To: Beginners (E-mail)
Subject: literal to regex
I want to convert a bunch of strings to regexs but I want all special
characters to be
Or..what the hell am I doing here ?? :)
-Original Message-
From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 5:19 PM
To: '[EMAIL PROTECTED]'
Subject: RE: THIS IS A TEST - PLEASE DELETE THIS EMAIL - THANKS
I think these kinds of messages would be cooler
Is it only one Trailing white space or any trailing white space??
If any trailing white space , then you can do
$HASH{$key} =~ s/\s+$//;
If One ...
$HASH{$key} =~ s/\s+$//;
And then you can compare
if ($HASH{$key} eq $myVariable) {
}
-Original Message-
From: Alaric Joseph
oopsfor one you do
$HASH{$key} =~ s/\s$//;
-Original Message-
From: Shishir K. Singh
Sent: Tuesday, June 11, 2002 4:31 PM
To: Alaric Joseph Hammell; [EMAIL PROTECTED]
Subject: RE: chop off 1 white space?
Is it only one Trailing white space or any trailing white space
^ - Beginning o the string
$ - End of the string
$myVar =~ s/^\s+//; - Remove all Leading White Space
$myVar =~ s/\s+$//; - Remove all Trailing White Space
What is your actual requirement ??
-Original Message-
From: Alaric Joseph Hammell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June
Hello,
I have a requirement to get the IP address of a user logged from a remote machine on
to UNIX machine. Now the user can be using multiple logins through VPN or otherwise.
I need to create something akin to command finger which will return the user his IP
address based on his current
for
something which is shell/platform independent.
Can it be done ??
-Original Message-
From: drieux [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 2:18 PM
To: perl beginners
Subject: Re: IP address
On Friday, June 7, 2002, at 09:41 , Shishir K. Singh wrote:
I have
My faultI meant the remote hostname.
-Original Message-
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 4:38 PM
To: 'drieux'; begin begin
Subject: RE: IP address
Maybe I misunderstood what he was asking. I thought he wanted to find out
what the
it for the time being by putting the following in my
..cshrc (cshell) by doing
setenv DISPLAY `who -m | sed 's/.*(\(.*\))$/\1/'`:0.0
-Original Message-
From: David T-G [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 5:12 PM
To: perl beginners
Cc: Shishir K. Singh
Subject: Re: IP
Hello,
I haven't tried it yet and wanted to know if anyone has the clue before I delve deeper
into it (just being lazy :)). According to the documentation , the Archive::Tar module
supports the *.gz format. I didn't find anything about *.Z (the compress format on
UNIX). Does Archive::Tar
the code to work for
the *.Z.
Any gurus out there who can help ??
Thanks
Shishir
-Original Message-
From: Beau E. Cox [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 2:16 PM
To: Shishir K. Singh; BeginnersPerl (E-mail)
Subject: RE: Question- Archive::zip/tar
Shishir
Don't know if you can do a search on an array (until and unless you want to evaluate
each element)
In case you are trying to achieve the multiple lines search, maybe this or the 2nd
example can help :
open (FILE , $ARGV[0]);
my @lines = FILE;
close(FILE);
$line = join( , @lines);
!!
-Original Message-
From: Eric Beaudoin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 4:29 PM
To: Shishir K. Singh
Cc: Ankit Gupta; [EMAIL PROTECTED]
Subject: RE: Help in Regular expression with array
At 16:12 2002.06.05, Shishir K. Singh wrote:
open (FILE , $ARGV[0]);
print ok
try putting my before the declaration
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
-Original Message-
From: Lance Prais [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 1:55 PM
To: Perl
Subject: Day Month Issues
I am getting the following error
How about writing it like this ??
Assuming
a) The numeric value is in 1st col and the text in 2nd col (after :)
b) Wherever numeric value is not present, the text is in the first column.
c) The numeric value needs to be picked up from the last successful read of the
numeric value if not
You forgot to add g (global)in the end...
$dirstruct =~ s/([\W])/-/g;
Cheers
Shishir
-Original Message-
From: Ankit Gupta [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 10:53 AM
To: [EMAIL PROTECTED]
Subject: help in regular expression
Hello Friends,
I need help in the below
No of elements in an array is given by $#ARRAY_NAME
eg the number of element in an array @array is $#array
-Original Message-
From: Barry Jones [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 11:17 AM
To: Beginners @ Perl (E-mail)
Subject: Simple array question
What type of
oops $#array is the index index of the last element
-Original Message-
From: Shishir K. Singh
Sent: Friday, May 31, 2002 11:23 AM
To: Barry Jones; Beginners @ Perl (E-mail)
Subject: RE: Simple array question
No of elements in an array is given by $#ARRAY_NAME
eg the number
I generally do it the tough way :(
###
open (CUST, $cust) or die Cant open it :$!;
$newnum = 0;
while (CUST) {
chomp;
@data = split /\|/;
$newnum++;
$hData{$data[1]}{$newnum} = [@data]; # 2 dimensional hash used in case your 2nd
element may
1 - 100 of 134 matches
Mail list logo