On Mon, 8 Jul 2019 at 13:45, Eko Budiharto wrote:
>
> dear all,
>
> first of all, thank you for the respond of my inquiry. And then, there
> is a few questions I would like to ask:
>
> 1. if someone takes your works and then he steals the credit by claiming
> the work is his work instead of your w
> On 7/6/19 11:21 PM, Eko Budiharto wrote:
> > it is a web application but it is on premise. The user is not honest.
> > That's why I am trying to find a way to protect the source code like
> > in java we can compile into java class and still can be run.
That's a false sense of securtiy. A suffici
On 27 July 2018 at 05:21, Andy Bach wrote:
>
> or, as Perl treats the "::" as a path denoter:
> $ perl -e 'use test::mytest; mytest::hello()'
> hello
>
> or:
> $ perl -mtest::mytest -e 'mytest::hello()'
> hello
>
> find ./test/mytest.pm via @INC's "."
Note: neither of those examples work on Perl
On 16 October 2017 at 12:21, Rui Fernandes wrote:
> Hi
>
> Did you try to declare before all the code (right after the modules):
>
> print "Content-type: text/html\n\n";
>
> ?
>
> Cheers
>
>
I don't understand why this reply is here, or what you expect it does.
That *looks* like you're doing HTT
On 16 October 2017 at 11:24, David Santiago wrote:
>
> Hi.
>
> How can i have \r\n on my heredoc string when i run my script in linux?
>
> my $text=<<"END";
> This is one line
> This is another one
> Final line
> END
>
> When i print this var in my linux box, i get this:
> "This is one line\nThis
On 27 May 2017 at 00:01, lee wrote:
> You have a variable.
Even in C, you'd have a variable as well. It would be a variable that
contains a *pointer* to a data structure.
The variable may be *typed*, but *types* don't impact anything about
the data storage in memory.
*types* in C are mechanism
On 26 May 2017 at 05:33, lee wrote:
> Perl doesn't have data structures, so variables in perl are not data
> structures. That is unfortunate.
So when I write:
my $var = {
memory => {
total => 1024,
free => 100,
buffers => 10,
},
};
What do I ha
On 6 November 2016 at 06:14, Jovan Trujillo wrote:
>
> 1207003PE_GM_09TNPLM2.csv
>
> I originally though m/[A-Za-z0-9\_]+/ would work, but it captures both
> strings.
> So then I tried m/[A-Za-z0-9\_]+(?!\.)/ but I still get both strings
> captured.
Alternatively, if your use case allows it, it m
On 19 August 2016 at 13:45, Kent Fredric wrote:
>if ( first { $item == 4 } @items ) {
>say "Yes";
>}
>
Ugh, my bad.
if ( first { $_ == 4 } @items ) {
say "Yes";
}
--
Kent
KENTNL - https://metacpan.org/author/KENTNL
--
T
On 19 August 2016 at 13:35, wrote:
>
> What's the better way to decide if an element exists in an array?
> Something like what ruby does,
>
> irb(main):001:0> x=[3,1,4,2,9,0]
> => [3, 1, 4, 2, 9, 0]
> irb(main):002:0> x.include? 4
> => true
> irb(main):003:0> x.include? 10
> => false
> irb(main)
On 2 June 2016 at 08:04, David Emanuel da Costa Santiago
wrote:
> They are using the same verion of Net::SSLeay (version 1.72). All the
> software have the same version.
No, not Net::SSLeay ... OpenSSL, which it links against.
And if you recently upgraded/downgraded OpenSSL to match versions,
N
On 2 June 2016 at 06:25, David Emanuel da Costa Santiago
wrote:
> The question for one million dollar is "Why?". And how can i improve
> the performance of my desktop to reach the same speed as my laptop
> (considering that i have better hardware on my desktop)? If i recompile
> perl instead of us
On 7 April 2016 at 07:20, Jonathon Fernyhough wrote:
>
> qq{} obviously wins when there would otherwise be a lot of escaping, but
> are there any downsides of using this method more generally (other than
> double-quotes being two characters shorter)? For example, is it "faster"
> for Perl to parse
On 1 March 2016 at 23:23, Arghya Das wrote:
> $dir = "c:/folder/*";
> my @files = glob( $dir );
>
> foreach (@files ){
>print $_ . "\n";
> }
Personally, I would have used either Path::Tiny, or at least, readdir() here.
There's far few places that can lead to strange bugs and security
holes
On 1 March 2016 at 19:35, Arghya Das wrote:
> $num = 1234;
> $sum = 0;
>
> while ( $num != 0)
> {
> $rem = $num % 10;
> $sum = ( $sum * 10 ) + $rem;
> $num = $num / 10;
> }
>
> print $sum;
I suspect you're just exceeding precision limits.
Modified code:
use strict;
use warnings;
my $num = 1234
On 28 February 2016 at 21:59, rakesh sharma wrote:
> According to docs bless returns the reference to self.
That just means that if you do:
my $x = {};
my $y = bless $x, "THING";
$y and $x will both be the same thing, a {} blessed into "Thing"
Its just more convenient to utilize the second of
On 13 February 2016 at 10:08, Kent Fredric wrote:
>
> All you're doing is sorting the *view* of it. Not the data itself.
If you want a demonstration of this fact, on a Linux filesystem, poke
around with 'find'. Or if you've got Path::Iterator::Rule installed:
per
On 13 February 2016 at 08:38, timothy adigun <2teezp...@gmail.com> wrote:
> In your analogy, if hashes are like folder, keys and values are like what?
> Name of folders. If yes, can those be sorted? If yes, they you have just
> made my point.. :)
Keys are files.
Values are file contents.
B
On 13 February 2016 at 07:39, timothy adigun <2teezp...@gmail.com> wrote:
> And hashes keys/values can't be sorted? Just saying.. :)
In my other message where I give an analogy to a "Folder" or
"Directory" in a file system.
Can you sort a folder? ... not really. They don't really have an
"order"
On 10 February 2016 at 03:46, James Kerwin wrote:
> (I'm a bit wary of hashes because they're weird).
If you want a nice way to reason about hashes when you're really new,
there's something that you probably already understand you can borrow
understanding from:
Folders.
A hash is like a folder
On 26 January 2016 at 12:02, Nathan Hilterbrand wrote:
> return wantarray() ? ($a, $b) : [$a, $b];
>
> In a list context, you get back a list.. otherwise you get back a reference
> to a list. Might not be what you want, though.
>
> Works with arrays, too..
>
> my @anarray = ()
> return wanta
On 7 January 2016 at 04:34, Ankita Rath wrote:
> Perl 5.008003 required--this is only version 5.00503, stopped at
> ../Modules/Modules_64/5.8.5/x86_64-linux-thread-multi/YAML/XS.pm line 26.
> BEGIN failed--compilation aborted at
> ../Modules/Modules_64/5.8.5/x86_64-linux-thread-multi/YAML/XS.pm li
On 15 December 2015 at 21:59, Jitendra Barik wrote:
> Please let me know difference between Perl 5 and Perl 6?
They are different languages.
At least, they are as different as Ruby and Perl 5, if not more so.
After all, there's not a lot of programming languages with Grammars as
a fundamental
On 8 December 2015 at 19:25, perl kamal wrote:
> I am trying to parse the inner loop elements of the attached input xml
> elements.
> The below code doesn't retrieve the inner loop() elements if
> the properties tag contains more than one item. Will you please point
> the error and correct me.
>
On 28 October 2015 at 06:26, shawn wilson wrote:
> time*tries*exp is probably more like what you want, and do it before
> you print the error, but yeah
Just make sure the backoff can't be exploited by malicious users to
lock out legitimate users by bombing the login system with failed
attempts.
On 27 October 2015 at 20:25, shawn wilson wrote:
> do to manage policies and prevent users from using weak passwords and
> emulate them.
And if you want some examples on how *NOT* to restrict passwords, this
site catalogues a lot of embarrasing failures.
http://password-shaming.tumblr.com/
And
On 20 October 2015 at 03:55, Lars Noodén wrote:
> What is the main reason for the preference of File::Slurper over
> File::Slurp these days?
http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broken-and-wrong.html
--
Kent
KENTNL - https://metacpan.org/author/KENTNL
--
To unsubs
On 6 August 2015 at 09:24, Alex Becker wrote:
> I started to use Test::POD and Test__POD::Coverage in my modules.
> However, I got the feedback that these tests should not be done when someone
> installs the module from CPAN. The logic is quite clear: POD issues are not
> critical.
>
> So, there w
On 23 July 2015 at 07:11, Alex Becker wrote:
>
> Perl now has subroutine signatures. However, they are marked as experimental
> feature.
> As I really like it, I'm always tempted to use it.
> On the other hand, I don't want to wast efforts to something I have to roll
> back.
>
> So, does anyone kn
On 8 July 2015 at 23:19, Nagy Tamas (TVI-GmbH) wrote:
> Is it a documentation mistake?
Do you have perl 5.22?
perl -MHash::Util=hash_value -E1 # Fine.
There is no mistake.
Those functions started being present in perl 5.18. If you don't have
them, you either have an older perl, or something i
On 8 July 2015 at 23:00, Kent Fredric wrote:
> impervious to accidentally typing trailing spaces inside the quotes:
Ugh. I forgot to note: you can read on these "operators" in :
perldoc -f qw
perldoc perlop # search for "Quote-Like"
--
Kent
KENTNL - https://met
On 8 July 2015 at 21:51, Nagy Tamas (TVI-GmbH) wrote:
>
>
> "hash_value" is not exported by the Hash::Util module
>
> "bucket_stats" is not exported by the Hash::Util module
>
> "bucket_info" is not exported by the Hash::Util module
>
> "bucket_array" is not exported by the Hash::Util module
>
> "
On 8 July 2015 at 19:12, Nagy Tamas (TVI-GmbH) wrote:
> This is the code:
>
> } elsif (defined($row) && ($row =~ m/\(\*[ ]+\"\@PATH\"[ ]+:=[
> ]+'(\/)?([\*A-Za-z_ ]*(\/)?)+'[ ]\*\)?/)) {
> # PATH first version: \(\*[ ]+@PATH[ ]+:=[ ]+'(\\/)?([\*A-Za-z_
> ]*(\\/)?)+'[ ]\*\)?
>
> my @
On 8 July 2015 at 04:40, Nagy Tamas (TVI-GmbH) wrote:
> m/\(\*[ ]+\"\@PATH\"[ ]+:=[ ]+'(\/)?([\*A-Za-z_ ]*(\/)?)+'[ ]\*\)?/))
This is not the exact code you 're using obviously, because the last 2
")" marks are actually outside the regex.
Removing those ))'s makes the regex compile just fine.
S
On 7 July 2015 at 16:41, Akshay Mohit wrote:
> As I told earlier there is a code already written on Performance testing
> using Perl threads and I need to maintain and own it because the person who
> was doing it earlier left the organization, so I am bound to maintain the
> code which is using th
On 7 July 2015 at 16:14, Akshay Mohit wrote:
> I need to maintain a code for performance testing which is fully written
> using Threads
That doesn't seem to help me a lot.
Because "Performance testing" in itself doesn't require threads. If
you just need to load up processors, then forks will do
On 7 July 2015 at 15:57, Akshay Mohit wrote:
> I am not so experienced in Perl and got a task to do in Threads.
The first question you have to ask is "Why do you need threads". What
are you doing?
Many people go "I need some sort of parallel process" and go "that
needs threads!".
But that is n
On 6 July 2015 at 19:43, Nagy Tamas (TVI-GmbH) wrote:
>
> Yes, I can produce an XML file.
I mean, can you paste-bin or attach an XML file which is minimal in
size, yet, still causes this problem to occur, so that we may also
attempt to see what is happening using said file.
I presently have no
On 6 July 2015 at 19:15, Nagy Tamas (TVI-GmbH) wrote:
> use XML::writer;
Is that supposed to be XML::Writer , or is it really XML::writer?
Either way, its irrelevant because its not used anywhere.
Can you produce an XML file that will repeat the problem, the attached
script I can't trigger a f
On 3 July 2015 at 19:18, ayush kabra wrote:
> I want to make customized module on perl but i don't know how to make it. i
> have checked on google but it's little bit confusing. i am not able to
> understand what is the meaning of EXPORTER_OK ,IMPORT and there is lot of
> thinh which i am not able
On 3 July 2015 at 18:54, bikram behera wrote:
> Hi Team,
>
>
> Any body can explain me how to do perl hash refernce and dereference.
>
Create a hash:
my (%hash) = ( "key" => "value" , "otherkey" => "othervalue" );
Create a reference to said hash:
my $reference = \%hash;
You can also make a h
On 17 June 2015 at 04:46, Vincent Lequertier wrote:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> open my $fh, '<', 'text';
> my @words = split ' ', <$fh>;
> my @matchs;
> while (my ($index, $elem) = each @words) {
> if ($elem eq 'bspwrt') {
> push @matchs, $index++;
>
On 9 April 2015 at 05:40, ayush kabra wrote:
> I need little bit help. i need to sort a file according to its 3rd column
> and i need the output. can you please help me on this.
> Input file we can take anyone either .txt or .xls or .csv. Please look
> into this and help me.
>
If you need somet
On 15 March 2015 at 21:41, Manfred Lotz wrote:
> I agree but I thought that in this case I would need to know the
> potential warning messages the :encoding(UTF-8) could issue in order to
> take action in those particular cases.
>
> Using a section local
> {
>open( local *STDERR,'>', $err);
>
On 15 March 2015 at 20:07, Manfred Lotz wrote:
> I prefer the method Charles showed. But nevertheless your method is
> interesting as well.
>
FWIW, SIG{__WARN__} is much preferred over redirecting stderr to simply
suppress/capture/filter warnings.
For instance, if somebody passes an object to w
On 14 March 2015 at 22:38, Manfred Lotz wrote:
> following error message which is fine.
Sorry for being pedantic, but I think you'll find that those are what we
call "warnings", not "errors".
Errors tend to be fatal.
However, curiously, "<:utf8" 's warnings seems to be regulated by the
warnin
On 10 March 2015 at 09:01, John SJ Anderson wrote:
> And the average latency of the network connection you're serving this
> captcha over is... ?
Its probably a bigger issue if you have > 2,000 customers at any time
fetching captchas =).
But the question is more "Not is the subroutine slower"
On 10 March 2015 at 00:56, Артём Варнайский wrote:
>
> I used a nytprof to check performance, function call reduces it.
Its not just "reduces it" that matters. Its whether reducing it in the
grand scale of things is really important. ( vs other parts of the system /
general usecases )
If for i
On 9 March 2015 at 03:11, Артём Варнайский wrote:
> due to performance issues
Important question:
How did you prove this was a performance issue.
Because unless you've
a) profiled your code
b) benchmarked your code
c) seen that the performance is significantly impeded by that function call
On 5 March 2015 at 17:15, Brandon McCaig wrote:
> Uri means that use is
> effectively requiring the module with a BEGIN block. That means
> that it will execute before any other code that isn't in a BEGIN
> block.
>
It may also be worth mentioning that "BEGIN" is actually a sub. A special
sub t
On 21 February 2015 at 04:29, nicolas wrote:
>
> Global symbol "$CONFIG_FILE" requires explicit package name at vowCons2.pm
> line 18.
> Compilation failed in require at sufpref.pm line 10.
> BEGIN failed--compilation aborted at sufpref.pm line 10.
> Compilation failed in require at ./base.pl lin
On 21 February 2015 at 02:35, Shawn H Corey wrote:
>
> > jupiter@jupiter-OptiPlex-755:~/Documents/base-0.50$ ./base.pl -i
> > words Global symbol "$CONFIG_FILE" requires explicit package name
> > at vowCons2.pm line 18.
>
> Go to line 18 of vowCons2.pm and change: $CONFIG_FILE
> to: $CONFIG_FILE
On 21 February 2015 at 01:38, nicolas wrote:
> Global symbol "$CONFIG_FILE" requires explicit package name at vowCons2.pm
> line 18.
This file has a syntax error due to $CONFIG_FILE being assigned to in a
context where it is not defined.
Usually this would mean you need to predeclare it somew
On 20 February 2015 at 09:56, Andy Bach wrote:
> $ sudo make install
Installing to your system with `sudo` is generally not recommended.
Ideally you should have a separate perl for user work, or at least a
local::lib based overlay set.
But these steps can be complicated ... for some. Though o
On 20 November 2014 10:05, Harry Putnam wrote:
> , unless I specifically google up
> some examples of something
>
I believe current advice is not to do that, as there is a vast abundance of
very poor/chronically outdated code that may be returned by such a search,
or you might end up copy-pasti
On 19 November 2014 11:46, Harry Putnam wrote:
> Only thing I did to debug was to make sure `use File::Find; comes
> after if (!@ARGV), but that seems not to matter.
>
That will be because 'use' is processed during BEGIN { }, while your
condition is during the main execution phase.
Though I thi
On 9 November 2014 05:42, Shlomi Fish wrote:
> > Should work... But the data is simply not correct.
> >
> > It acts as a proxy, so I receive a request, I collect the data from
> > the remote server (capture the packets on the wire with tcpdump), I
> > send the data to the client through perl conn
On 9 November 2014 05:46, Kent Fredric wrote:
>
> Because when you need it, you'll know it.
>
Though to counter myself, it proves useful in some places if file IO is
problematic or you have security concerns with direct writing to local
storage.
Though the first of those two p
On 9 November 2014 05:39, Артём Варнайский wrote:
> Also, I have no idea how to design databases. For example, should I store
> photos separately from the DB or in it?
The answer to that question depends on what your database is, and what your
demands are with regards to replication.
Binary Bl
On 9 November 2014 05:27, Ron Bergin wrote:
> In fact, I
> almost never use or suggest using eval.
>
eval itself is not evil. Its just *string* eval becuase that involves
arbitrary code interpolation.
Non-string eval is of course potentially written as "try" in other
languages ( not exactly,
On 9 October 2014 08:36, Hans Ginzel wrote:
> I want to use one global hash variable for options or configuration
> variables
> like verbose, debug. I don't want to pass them to each function
> or to almost each object.
>
Indeed, Jim Gibson explains you can simply declare "our" in both files an
On 9 October 2014 03:35, Hans Ginzel wrote:
> Hello!
>
> Let's consider following strip-down example:
>
> # file a.pl
> use strict;
> package a;
> our $var=1;
> warn "var=$var";
>
> # file b.pl
> use strict;
> #no strict qw/vars/;
> require 'b.pl';
> package a;
> warn "var=$var";
>
> How to get r
On 7 October 2014 16:07, Benjamin Fernandis wrote:
> + Attaching log file.
>
Lacking Env.pm basically means your vendor's Perl is broken. Env.pm is
shipped with Perl itself, and subsequently things may forget to depend on
it ( at least, in a way that cpan tools recognise ) and be silently broke
On 7 October 2014 05:04, punit jain wrote:
> it breaks. I tried multiple regex, however could not get it working.
> Any clue on regex changes to accomodate this ?
>
>
1. You said you have a regex, and that you can't get it working, but what
is it that isn't working?
2. This might not be applicabl
On 9 August 2014 16:32, Uday Vernekar wrote:
> Hi All,
>
>
> please help me in understanding this script.
>
Please explain what it is about this script you want to understand / don't
quite understand.
Also, if there's something not working in this script, a primary candidate
list of potential p
The script begins:
>
> #!/usr/bin/perl
>
> use Tie::File;
> use File::Copy 'copy';
> use File::Spec;
>
>
I think this problem becomes much clearer if you enable strict.
-- [ A.pl ] ---
my @list = qw( a b c );
print "X $list Y";
-- [ A.pl output ] --
X Y
-- [ B.pl ] --
use strict;
my @list =
On 24 July 2014 02:06, Sam wrote:
>
> Can you post those changes or a link to the mailing list? It might be wise
> for someone to update the module
>
>
> --Sam
>
>
Upstream have conferred they want to be released from maintaining it and
are looking for somebody take up the mantle.
https://rt
On 22 July 2014 06:05, Chris wrote:
> I'm not a programmer so I apologize if I'm on the wrong list but I'm
> looking for some assistance in installing File::Scan::ClamAV. I've tried
> multiple ways, CPAN and from source, to install this and I constantly
> get the errors shown here http://pastebin
On 20 July 2014 09:33, Harry Putnam wrote:
>
> So all and any ideas, suggestions etc would be well received on this end.
>
>
One approach that may help is to double down on CPAN. This may reduce the
total number of tricks you have to learn, by finding proxies that do the
tricks for you.
for inst
On 8 July 2014 19:00, Uday Vernekar wrote:
> when i try to install Path::Tiny it gives me following error
>
> # The following REQUIRED prerequisites were not satisfied:
> #
> # File::Spec version '3.33' is not in required range '3.40'
> #
> t/00-report-prereqs.t . ok
> t/basename.t ..
I'm not about to write my own version here, just offer some pointers I find
makes life easier for myself, and they may help others too if you're not
bound to "I don't want to use CPAN".
These days, I find it easier and safer to just use
> use Path::Tiny qw(path);
>
> my $infile = path('numbers.tx
On 6 July 2014 02:31, Sunita Pradhan
wrote:
> I have a set of code for count number of lines and number of words .
>
> #!/usr/bin/perl
>
> while ($line = ){
> chomp ($line);
> $hash{L_c_start}++ if ($line =~ /^C.*/i);
> @words = split /\s+/,$line;
> *foreach $c (k
72 matches
Mail list logo