Dear list
I want to compile a perl code into some encrypted format . My main goal is I
don't want to give anyone my source code and I want only to give the
executable. These codes will run only on Unix flavors O.S. So how to do this
. I have tried with perlcc but not getting the output. One more th
Here is the code to accomplish your task.
use warnings;
use strict;
my $a = "a, 1, b, 2, c, 3";
$a =~ s/ //g; #delete spaces from $a
my @array = split(",",$a);
my %b = (
$array[0] => $array[1],
$array[2] => $array[3],
$array[4] => $array[5]
);
for (keys%b)
{
print "$_ => $b{$_}\n";
}
The
can some one please help me with an example to list all the directories and
their soft-links.
Thanks,
Nagesh
2008/3/26 Sandy <[EMAIL PROTECTED]>:
> On 26 мар, 07:33, [EMAIL PROTECTED] (Nag) wrote:
> >
> > I have a parent directory which contains nearly 10 soft-links to other
> > directories,
[EMAIL PROTECTED] wrote:
On Mar 29, 4:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
[EMAIL PROTECTED] wrote:
When I do string comparisons in perl the strings seem to ignore the
embedded hyphens.
I want to sort strings assuming the 'dictionary' order of the chars is
ASCII order: hypen, 0-9,
Trudge wrote:
On Mar 30, 8:13 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
If you have multiple templates you might want to use Inline::Files*
instead of a straight DATA block.
Chas. I've installed this and gave it a quick whirl. While it does
print OK from various blocks, I couldn't get it to
[EMAIL PROTECTED] wrote:
Gunnar Hjalmarsson wrote:
Trudge wrote:
Now I know it can be done, so I will be exploring this method.
Not much to explore, really. Did you read the applicable Perl FAQ?
Even if it provides this method, it doesn't exactly recommend it...
Besides full-blown templat
Gunnar Hjalmarsson wrote:
Trudge wrote:
On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
Trudge wrote:
I'm trying to get a script to interpolate variable values in a
__DATA__ block if possible.
It can be done; see the FAQ entry
perldoc -q "expand variables"
[EMAIL PROTECTED] wrote:
On Mar 30, 6:54 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
die() exits the program.
Yes, I understand that die() exits the program. My question was are
you able to process more than one line of code in a die() context?
die(), like print() and warn(), prints a li
On Mar 29, 4:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
> [EMAIL PROTECTED] wrote:
> > When I do string comparisons in perl the strings seem to ignore the
> > embedded hyphens.
> > I want to sort strings assuming the 'dictionary' order of the chars is
> > ASCII order: hypen, 0-9, A-Z.
> > It a
On Mar 30, 8:13 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On Sat, Mar 29, 2008 at 9:14 PM, Trudge <[EMAIL PROTECTED]> wrote:
>
> > On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
> > > Trudge wrote:
> > > > I'm trying to get a script to interpolate variable values in a
> > >
On Mar 30, 8:13 am, [EMAIL PROTECTED] (Chas. Owens) wrote:
> On Sat, Mar 29, 2008 at 9:14 PM, Trudge <[EMAIL PROTECTED]> wrote:
>
> > On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
> > > Trudge wrote:
> > > > I'm trying to get a script to interpolate variable values in a
> > >
On Mar 30, 6:54 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
> That is usually written as:
>
> if ( @ARGV != 1 ) {
>
Good tip. Thank you.
> Why not pass $EX_USAGE to ExitScript() instead of using global $ExitStatus?
>
> ExitScript( $EX_USAGE );
Consistency is all. I try to get into a ha
Dr.Ruud wrote:
Richard Lee schreef:
While reading perl cookbook, I came to page 94 and having a hard time
understanding this particular phrase
my $sepchar = grep( /,/ => @_ ) ? ";" : ",";
Shortcutting alternative:
my $sepchar = ",";
for (@_) { /,/ and $sepchar = ";" and last
Richard Lee schreef:
> While reading perl cookbook, I came to page 94 and having a hard time
> understanding this particular phrase
>
> my $sepchar = grep( /,/ => @_ ) ? ";" : ",";
Shortcutting alternative:
my $sepchar = ",";
for (@_) { /,/ and $sepchar = ";" and last }
but (unless @_ i
Rob Dixon wrote:
Richard Lee wrote:
While reading perl cookbook, I came to page 94 and having a hard time
understanding this particular phrase
my $sepchar = grep( /,/ => @_ ) ? ";" : ",";
I recognize the ternary operator and grep but I am not sure how they are
forming the meaning together
yitzle wrote:
my $sepchar = grep( /,/ => @_ ) ? ";" : ",";
And I also don't understand what ";" is doing in the ternary operator??
The ";" is what is returned if the condition is TRUE.
"( / ,/ => @_)" is a(n anonymous) hash.
No it is not. /,/ and @_ are just two arguments to the grep() fu
Richard Lee wrote:
>
> While reading perl cookbook, I came to page 94 and having a hard time
> understanding this particular phrase
>
> my $sepchar = grep( /,/ => @_ ) ? ";" : ",";
>
> I recognize the ternary operator and grep but I am not sure how they are
> forming the meaning together.
>
>
> my $sepchar = grep( /,/ => @_ ) ? ";" : ",";
> And I also don't understand what ";" is doing in the ternary operator??
The ";" is what is returned if the condition is TRUE.
"( / ,/ => @_)" is a(n anonymous) hash. I've had no idea that grep can
operate on a hash.
However, it seems that "grep( /
Richard Lee wrote:
While reading perl cookbook, I came to page 94 and having a hard time
understanding this particular phrase
my $sepchar = grep( /,/ => @_ ) ? ";" : ",";
I recognize the ternary operator and grep but I am not sure how they are
forming the meaning together.
I thought grep
While reading perl cookbook, I came to page 94 and having a hard time
understanding this particular phrase
my $sepchar = grep( /,/ => @_ ) ? ";" : ",";
I recognize the ternary operator and grep but I am not sure how they are
forming the meaning together.
I thought grep needed lists to wo
On Sat, Mar 29, 2008 at 9:14 PM, Trudge <[EMAIL PROTECTED]> wrote:
>
> On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
> > Trudge wrote:
> > > I'm trying to get a script to interpolate variable values in a
> > > __DATA__ block if possible. This is a kind of alternative to a ful
[EMAIL PROTECTED] wrote:
Hey All!
Hello,
I've written a Bash script called `clock`, which is called by one of
two symbolic links: `clock-in` and `clock-out`. This script is,
effectively, a time-clock for tracking time spent on various projects
for clients. This script generates a "time card
JBallinger wrote:
I am trying to automate a search query from a website that uses CGI
script to process the query.
I want my script to post a search query to a website, and then parse
the html result from the website back into an output file.
Could someone give me some direction on how to do th
Trudge wrote:
On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
Trudge wrote:
I'm trying to get a script to interpolate variable values in a
__DATA__ block if possible.
It can be done; see the FAQ entry
perldoc -q "expand variables"
while () {
On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
> Trudge wrote:
> > I'm trying to get a script to interpolate variable values in a
> > __DATA__ block if possible. This is a kind of alternative to a full-
> > blown template method. I'm not sure if I can even do what I want,
> > hen
Hey All!
I've written a Bash script called `clock`, which is called by one of
two symbolic links: `clock-in` and `clock-out`. This script is,
effectively, a time-clock for tracking time spent on various projects
for clients. This script generates a "time card" file, if one does
not exist in my "
Hi,
I am trying to automate a search query from a website that uses CGI
script to process the query.
I want my script to post a search query to a website, and then parse
the html result from the website back into an output file.
Could someone give me some direction on how to do this? Where shoul
Hi,
I am trying to run the following sub routine to copy a file from remote dir
to local. I am passing three arguments remote file, local file and the host
along with the user name. But, the program is not working. could somebody
please help me.
sub getFile {
my ( $rFile, $lFile, $rHost ) = @_;
Hi All,
Greetings. I am trying to create pdfs with perl (basically some text data)
and
I want to give them pdf protection to disallow any modification. The target
is
not to really achieve industry grade protection but to just let the end user
know
that it is not recommended to modify the content i
29 matches
Mail list logo