ok guys and gals at the moment i am perplexed (prolly cuz i been looking at it to long) but here it is.
OS: sol8
perlver: 5.8.0
shell: ksh
answer must be in perl!!
issue:
when i use pack() it packs the data at the front of the requested field space. normally it wouldnt be a problem if... (1 Reply)
Hello everyone.
I wrote a perl script to get the two answers from a value: x.
By this, I want to do sqrt($x) in different precision.
#!/usr/bin/perl
print "Input the initial value x:\n";
chomp($x=<STDIN>);
$comp=sqrt($x);
$float_value=pack("f", $comp);
$double_value=pack("d", $comp);... (2 Replies)
Hi! I'm doing bash shell scripting and would like to know if bash had something similar to perl's split function? Ultimately, I want to split two strings (delimeter = '.') and compare each of their values. Thus, I figured putting them in an array would be easiest.
So i.e.:
String 1:... (5 Replies)
I have a file that contains user id and corresponding password.
Lets say password is "help". The below command will create a hex value for string "help".
perl -e 'print unpack "H*","help"'
So now password is in encoded format.
Then I decoded it in the script where am fetching the... (1 Reply)
Is it possible to invoke a perl function from a bash script ?
There are existing perl scripts with many functions that I want to reuse from a more recent script written in bash. Hence the question. (1 Reply)
In Perl I can write a condition that evaluates a match expression like this:
if ($foo =~ /^bar/) {
do blah blah blah
}
How do I write this in shell? What I need to know is what operator do I use? The '=~' doesn't seem to fit. I've tried different operators, I browsed the man page for... (3 Replies)
Hi I have a code like this:
sub WriteEbcdicHeader
{
my $Htimestamp=localtime();#i need to pack and unpack this
my $eheaderline = $Htimestamp;
#packing has to be done here
#unpacking has to be done after packing
print $EOUTFILE
return $eheaderline;
}
sub WriteEbcdicTrailer
{
... (5 Replies)
Hello All,
Alright, so this is driving me absolutely insane. I can't seem to find this ANYWHERE...
I've tried every combination and synonym I can think of for this trying to search Google.
What is the Expect/Tcl equivalent to Perl and Bash's "=~" operator, (i.e. the "contains" operator).... (2 Replies)
Discussion started by: mrm5102
2 Replies
LEARN ABOUT PHP
v8js.__construct
V8JS.__CONSTRUCT(3) 1 V8JS.__CONSTRUCT(3)V8Js::__construct - Construct a newV8Jsobject
SYNOPSIS
public V8Js::__construct TRUE ([string $object_name = "PHP"], [array $variables = array()], [array $extensions = array()], [bool
$report_uncaught_exceptions])
DESCRIPTION
Constructs a new V8Js object.
PARAMETERS
o $object_name
- The name of the object passed to Javascript.
o $variables
- Map of PHP variables that will be available in Javascript. Must be an associative array in format array("name-for-js" => "name-
of-php-variable"). Defaults to empty array.
o $extensions
- List of extensions registered using V8Js.registerExtension(3) which should be available in the Javascript context of the created
V8Js object.
Note
Extensions registered to be enabled automatically do not need to be listed in this array. Also if an extension has dependen-
cies, those dependencies can be omitted as well. Defaults to empty array.
o $report_uncaught_exceptions
- Controls whether uncaught Javascript exceptions are reported immediately or not. Defaults to TRUE. If set to FALSE the uncaught
exception can be accessed using V8Js.getPendingException(3).
RETURN VALUES
Returns a new V8Js context object.
PHP Documentation Group V8JS.__CONSTRUCT(3)