## Perl / JavaScript, 74 bytes

Perl returns a palindrome and JavaScript 'de-palindromizes' the input string.

    s=prompt();console.log(s.slice(0,s.length/2+.5|0));eg=1;t=eg;s=$=reverse$_=eg

### JavaScript

Assumes the string is a valid palindrome already.

All the work happens in the first section:

<!-- language: lang-js -->

    s=prompt();console.log(s.slice(0,s.length/2+.5|0));

Stores input in `s`, then returns the first half (rounded-up) of the string. The rest of the script is pointless variable assignments:

<!-- language: lang-js -->

    eg=1;t=eg;s=$=reverse$_=eg

Try it here:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

    s=prompt();console.log(s.slice(0,s.length/2+.5|0));eg=1;t=eg;s=$=reverse$_=eg

<!-- end snippet -->

### Perl

Must be run with `-pl`, eg:

<!-- language: lang-sh -->

    perl -ple 's=prompt();console.log(s.slice(0,s.length/2+.5|0));eg=1;t=eg;s=$=reverse$_=eg' <<< 'test'
    # returns testtset

The code is basically two substitutions (`s///`), but using `=` as the delimiter instead of `/`:

<!-- language: lang-pl -->

    s/prompt();console.log(s.slice(0,s.length\/2+.5|0));eg/1;t/eg;s/$/reverse$_/eg

The first, replacing `prompt();console.log(s.slice(0,s.length\/2+.5|0));eg` (which, admittedly will mess up your palindrome that contains `"prompt;console.logs.slice0;eg"`...) with `1;t` which is `eval`ed, returning `t`, the second replaces the end of string `$` with `reverse$_` which is then also `eval`ed and appends the original source string reversed.

[Try it online!][1]


  [1]: https://ideone.com/IFHfOp